my $timeout = 20; # or whatever is appropriate eval { local $SIG{ALRM} = sub { die "timedout" }; alarm $timeout; # Your system call goes here.... alarm 0; }; if ($@) { # $@ will contain error message, if any }
Hope this helps,
Darren :)
In reply to Re: system @args problem
by McDarren
in thread system @args problem
by qiaojy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |