#!/usr/bin/perl -w use strict; use XML::RSS; use LWP::Simple; use HTML::Entities; my $page; my $rss = new XML::RSS (version => '1.0'); $page = get("http://www.bill-bailey.co.uk/blog/index.php"); $rss->channel(title => 'Bill Bailey', link => 'http://www.bill-bailey.co.uk/blog/index.php', description => 'Bill Bailey\'s Blog'); my @chunks = split ('', $page); my ($date, $link, $content, $title); foreach (@chunks) { if (/\s*
\s*([^\r\n]*)[\r\n\s]*<\/td>/is) { # print $1; $date = $1; } if (/\s*([^\r\n]*)[\r\n\s]*<\/td>/is) { # print $1; $title = $1; } if (/(.*)<\/td>\s*<\/tr>\s*
 /is) { # print $1; $content = encode_entities($1); } if (/\s*Read comments/is) { # print $1; $link = "http://www.bill-bailey.co.uk$1"; } if ($date && $title && $content && $link) { $rss->add_item(title => $title, link => $link, description => $content, dc => {date => $date}); } } print $rss->as_string;