http://www.perlmonks.org?node_id=953981


in reply to How to run a command, gather its output and kill it after a specified time?

You already kill the external program. You then decide to kill the main program when that happens. If you don't want to die, then, well, don't.