How do I timeout a slow event?

Use the alarm() function, probably in conjunction with a signal handler, as documented in perlipc/"Signals" and the section on ``Signals'' in the Camel. You may instead use the more flexible Sys::AlarmCall module available from CPAN.


Back to perlfaq8