Re: Perl HTTP Get

2012-05-30 Thread Chris Nehren
On Tue, May 29, 2012 at 21:45:16 -0500 , Matt wrote: Thanks. Yes, using Simple. Looking at this. Can I do something as simple as this? $rststr = ; alarm(60); # set timer for 60 seconds $rststr = get(http://; . $dst . /request.htm ); # try to get my data alarm(0); # turn off timer More

Re: Perl HTTP Get

2012-05-30 Thread Matt
Thanks.  Yes, using Simple.  Looking at this. Can I do something as simple as this? $rststr = ; alarm(60); # set timer for 60 seconds $rststr = get(http://; . $dst . /request.htm ); # try to get my data alarm(0); # turn off timer More or less, yes--have you tried it? Also, do consider

Re: Perl HTTP Get

2012-05-30 Thread Chris Nehren
On Wed, May 30, 2012 at 16:22:29 -0500 , Matt wrote: I did this. Snippet from larger code: eval { $rststr = ; local $SIG{ALRM} = sub { die get timeout }; alarm(30); $rststr = get(http://; . $dst . /request.htm ); # try to get my data alarm(0);

Re: Perl HTTP Get

2012-05-30 Thread John W. Krahn
Chris Nehren wrote: On Wed, May 30, 2012 at 16:22:29 -0500 , Matt wrote: I did this. Snippet from larger code: eval { $rststr = ; local $SIG{ALRM} = sub { die get timeout }; alarm(30); $rststr = get(http://; . $dst . /request.htm ); # try to get my data

Re: Perl HTTP Get

2012-05-29 Thread Matt
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

Perl HTTP Get

2012-05-27 Thread Matt
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? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: Perl HTTP Get

2012-05-27 Thread Chris Nehren
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