Extract certain part of RSS using Perl? Read please?

qwerty

New member
I have a RSS feed that I always need the second <description> info from a rss feed, but with perl, I have been having no such luck. It would be really nice if you could help!!!
 
It would be nice if you showed us some code and data. But here is a snippet to get "the second <description>":

my $s = qq{this is a bunch of RSS?};
# Separate the RSS into chunks that start with <description>:
my @as = split(/<description>/, $s);
# Get the second chunk:
my $sDesc = $as[2];
# Delete the end-tag:
$sDesc =~ s!</description>!!;
 
Back
Top