in reply to subroutines which forks?

Simplest answer is, "Don't". Use Parallel::ForkManager (or perhaps POE and POE::Wheel::Run) and let it worry about such niceties for you.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: subroutines which forks?
by BrowserUk (Patriarch) on Sep 10, 2010 at 22:30 UTC

    Except that does almost the exact equivalent of the OPs code! (Did you bother to look?)