in reply to Queuing system for running a perl program
It's not entirely clear to me what you're trying to do. However, I find Parallel::ForkManager useful for controlling how many jobs get spawned at once and IPC::ConcurrencyLimit handy for making sure that I don't run multiple copies of my scripts at the same time.
You can find examples of both in the scripts that keep cpXXXan up to date.
In Section
Seekers of Perl Wisdom