in reply to Re: sending multiple commands
in thread sending multiple commands

Parallel::ForkManager (which you originally suggested) provides a simple way to specify the maximum number of parallel processes — no need to reinvent the wheel.