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
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
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);
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
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
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:
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