Here's a slightly simpler version that I whipped up in a few minutes, requiring
XML::RSS and
Template as well as
LWP:
#!/usr/bin/perl -w
use strict;
my $SLASHCACHE = "/Users/merlyn/slashdot.rdf";
use LWP::Simple;
use Template;
mirror("http://slashdot.org/slashdot.rdf", $SLASHCACHE);
my $t = Template->new;
$t->process(\*DATA, { slashcache => $SLASHCACHE} ) or die $t->error;
__END__
===
Here's the news:
[% USE news = XML.RSS(slashcache);
FOREACH item = news.items;
LAST IF loop.count > 10; -%]
[% loop.count %]: [% item.title %]
at [% item.link %]
[% END -%]
===
-- Randal L. Schwartz, Perl hacker