You could use alarm and the proper signal handler.
$SIG{ALRM} = sub { print "got signal, bye bye!\n"; exit 0; }; alarm 2; sleep 10; __END__ got signal, bye bye!
--
David Serrano
In reply to Re: print # while doing file copy
by Hue-Bond
in thread print # while doing file copy
by sashac88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |