in reply to Possible to write a sub that times out???
An example usage might be:
my $timeout = 20; eval { local $SIG{ALRM} = sub { die "timedout" }; alarm $timeout; #Call your subroutine here.... alarm 0; }; if ($@) { # $@ will contain error message, if any }
Hope this helps,
Darren :)
|
|---|