http://qs321.pair.com?node_id=875076


in reply to Re^3: fixed set of forked processes
in thread fixed set of forked processes

Have a look at Parallel::Iterator - Simple parallel execution, too.

The workers option sets the number of concurrent processes to launch.

my $max_forks = 42; my $options = { workers => $max_forks, }; iterate( $options , $worker, $iterator );