See also "perldoc -f alarm" and "man perlipc".local $SIG {ALRM} = sub {die "alarm"}; eval { alarm (5); system "sleep 10"; alarm (0); }; if ($@ && $@ =~ /^alarm/) { say "Command interrupted"; }
In reply to Re: Track command time
by JavaFan
in thread Track command time
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |