You could fork off the other program, and kill it and use a default if it does not return in your specified timeout period.
Or use alarm to set a timeout & $SIG{ALRM} to set up defaults in the case that your external command did not return. That assumes that your external command is not blocking execution of your Perl, so you may have to fork it off anyway.
=Blue
...you might be eaten by a grue...
In reply to Re: how to make timeouts?
by Blue
in thread how to make timeouts?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |