Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: LWP timeout

by dchau (Novice)
on Apr 02, 2001 at 14:49 UTC ( [id://69010]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to LWP timeout

I tried parsing the $response that doesnt work and i tried
$timeout = 0; foreach (@url){ chomp; $site = "$_"; $time = time(); $ua->timeout(2); $SIG{'ALRM'} = sub {$timeout =1;}; $request = new HTTP::Request POST => $site; $response = $ua->request($request); $return_code = $response->code([$code]); print "return code = $return_code\n"; print "timeout = $timeout\n"; &check_status($site, $return_code, $time);
When i print out $timeout it remains 0 doesnt change to 1 when the request times out

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://69010]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.