in reply to select and %SIG
This works on Linux and should work on other UNIX-like OSs as well. It won't work on Windows (both ActiveState and Cygwin) since select returns the time that was passed in as $timeleft, regardless of how long you've slept.my $timeleft = 10000; while ($timeleft){ $timeleft = (select(undef,undef,undef,$timeleft))[1]; }
Hope this helps.
|
|---|