this should give you a 10 second timeout on your function call.eval { local $SIG{ALRM} = sub { die "Timed Out" }; alarm 10; ### IO::Socket/Select function call goes here alarm 0; }; if ($@ and $@ !~ /Timed Out/) { die }
--
hiseldl
In reply to Re: Timeouts when reading from socket Filehandles?
by hiseldl
in thread Timeouts when reading from socket Filehandles?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |