in reply to Re^2: wrong pidin thread wrong pid
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.