Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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"; }

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://351436]
help
Chatterbox?
[marto]: shmem: I've not been awake all night, but it really hasn't stopped raining since early yesterday :)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-07-26 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (388 votes). Check out past polls.