![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re^3: socket time outby Anonymous Monk |
on Jan 04, 2008 at 11:24 UTC ( [id://660405]=note: print w/replies, xml ) | Need Help?? |
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"; }
In Section
Seekers of Perl Wisdom
|
|