silkworth has asked for the
wisdom of the Perl Monks concerning the following question:
I have a script which processes numerous files with an external program. the script itself just creates the input file list, and loops through them all with a for loop, calling this external program each time. however, sometimes this external program has an internal error (bad input file, etc) so the perl script can't/won't move on to the next file unless i manually kill (Ctrl+Alt+Del) the external program. When all is going well this external program only takes a few seconds, so I'm trying to find a way to make the script wait for a little longer than it should take, then kill this external program if its still running (ie it's most likely stuck). Any ideas? I've been reading up on system, exec, kill, and sleep, but I'm new to perl and really don't know what i doing. Thanks!