Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Perl program for displaying RSS feed?

by crouchingpenguin (Priest)
on May 07, 2004 at 13:03 UTC ( #351436=note: print w/ replies, xml ) Need Help??

in reply to Perl program for displaying RSS feed?

Use XML::RSS installed locally within your home directory. Here is an example:

#!/usr/bin/perl use strict; use warnings; use XML::RSS; use lib './path/to/home/dir/perl/libs'; # optionally download via a url # or slurp in a file use LWP::Simple; my $url = "http://someurl/file.rss"; my $document = get($url); my $rss = new XML::RSS(Style => 'Debug'); $rss->parse($document); foreach my $item (@{$rss->{'items'}}) { print "<a href=\"$item->{link}\">$item->{title}</a>\n"; }

"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Comment on Re: Perl program for displaying RSS feed?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://351436]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-12-01 09:53 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (798 votes), past polls