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


in reply to Waiting..

You might find Parallel::ForkManager useful. It was made to make this sort of thing easy, and your sample code is almost an example from the pod.