in reply to Re: wrong pid
in thread wrong pid

Thanks. You're right. I want to send the filename to the subprocess process_tar.pl.

#!/usr/bin/perl print "\n" . $ARGV[0]; sleep 40;

Then after launching this, I want the parent script to carry on running and launch 5 more process_tar.pl's, then wait until one or more of these have finished before running any more.

So you're saying use fork for this?

Replies are listed 'Best First'.
Re^3: wrong pid
by kyle (Abbot) on Apr 23, 2007 at 14:24 UTC

    Yes, I was saying use fork for this. Given that you want to launch several processes and wait for them before running more, I might suggest Parallel::ForkManager instead.