in reply to Timeout on script

It's not like you are the first one with this problem. The answer is: fork, exec, $SIG {ALRM}, eval, alarm, and wait.

You might want to consult man perlipc.

Abigail