Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Net::Ping not working

by BastardOperator (Monk)
on Sep 12, 2000 at 04:44 UTC ( [id://32041]=note: print w/replies, xml ) Need Help??


in reply to Net::Ping not working

You could always just start doing what you're trying to do and set up and alarm handler.
$SIG{ALRM} = sub { die "timeout" }; eval { alarm(300); # do stuff here alarm(0); }; if($@) { if($@ =~ /timeout/) { # # Call our alrm_hdlr subroutine, we were hung up # alrm_hdlr(); } else { alarm(0); die; } } # continue on, manipulate data, etc... sub alrm_hdlr { # Handle the fact that we got hung up }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://32041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2024-04-19 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found