SPUG: XML::RSS help

luis medrano lmzaldivar at gmail.com
Tue Sep 26 14:52:48 PDT 2006


I have this script:

foreach my $url (@list_of_rss_url){

    my $rss=XML::RSS->new();
    my $data=get($url)or  die  "Couldn't get it!";# unless defined $data;
    $rss->parse($data);
        foreach my $item (@{$rss->{items}}){
        my $link=$$item{link};
        my $title=$$item{title};
        print "$link, $title \n";
        }
}

but my problem is I don't want the script to die if the rss is not valid or
not available when I call it.

Any of you knows how can I make this work?

Thanks,
Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/spug-list/attachments/20060926/7ffd5cbf/attachment.html 


More information about the spug-list mailing list