in reply to PerlMonks Newest 10 Nodes Grabber
So here's the same thing but using XML::RSS:
#!/usr/local/bin/perl -w use strict; use constant URL => 'http://www.perlmonks.org/headlines.rdf'; use LWP::Simple; use XML::RSS; my $rss = new XML::RSS; $rss->parse( get URL ); for my $item (@{ $rss->{'items'} }) { print "<a href=", $item->{'link'}, ">", $item->{'title'}, "</a><br +>\n"; }
|
|---|