On Sun, May 27, 2012 at 14:00:34 -0500 , Matt wrote: > I have a line like this: > > $rststr = get("http://" . $dst . "/request.htm" ); > > Problem is that I have had this script hang due to the $dst site being > down. Is there a way to do a time out?
Consider using the core alarm() function, or using LWP::UserAgent (I'm guessing you're using LWP::Simple here, which is just a wrapper around LWP::UserAgent) and specifying the timeout attribute on that object. -- Chris Nehren | Coder, Sysadmin, Masochist Shadowcat Systems Ltd. | http://shadowcat.co.uk/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/