in reply to Re: Self terminating a script after a specified time
in thread Self terminating a script after a specified time

Some notable things about alarm:

Only one timer may be counting at once. Each call disables the previous timer

It is usually a mistake to intermix alarm and sleep calls, because sleep may be internally implemented on your system with alarm.

If you want to use alarm to time out a system call you need to use an eval/die pair. ... caveats given in Signals in perlipc.

Portability issues: alarm in perlport.

  • Comment on Re^2: Self terminating a script after a specified time