Ave bronto!
It seems that you are looking for some sort of
job queue manager, an application pattern for which we fortunately have several implementations in Perl, some of which are widely used and considered very
reliable: please have a look at
TheSchwartz or
POE::Component::JobQueue (there are also several others).
If not solve your problem out-of-the-box, they should at least facilitate it.
In (the likely) case I've completely missed your point, I'll accept your
e me lo dovevi di' tu! ;-)
Ciao, Emanuele.