SPUG: XML::RSS help
Eric Wilhelm
scratchcomputing at gmail.com
Tue Sep 26 15:09:28 PDT 2006
# from luis medrano
# on Tuesday 26 September 2006 02:52 pm:
>I don't want the script to die if the rss is not valid or
>not available when I call it.
As Jerry said, don't die. Also, you may want to look at `perldoc -f
eval`.
>$rss->parse($data);
eval { $rss->parse($data) };
if($@) {
warn "something wrong with parse: $@";
# now try again or recover and/or exit gracefully
}
--Eric
--
Consumers want choice, consumers want openness.
--Rob Glaser
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the spug-list
mailing list