Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: socket time out

by Anonymous Monk
on Jan 04, 2008 at 11:24 UTC ( [id://660405]=note: print w/replies, xml ) Need Help??


in reply to Re^2: socket time out
in thread socket time out

It's just missing a ; in the example at the end of the eval closing brace:
eval {
    local $SIG{'ALRM'} = sub { die "Timed out" };
    alarm($timeout);
    while(<$conn>) {
       ....
       alarm($timeout);
    }
    alarm(0);
};
if ($@ =~ /Timed out/) {
    print STDOUT "Timed Out.\r\n";
}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2025-06-15 18:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.