fork off a number of child processes instead of running multiple instances of PerlModern UNIXs, Linux, and even Windows, share read-only code pages. So although there appears to be multiple instances of perl running, the code is actually only loaded once. Data pages are not shared (usually) and those will be unique to each process. Threads of execution
can share data pages as well, but that involves multi-threading and is a whole different game to forking child processes.
Aside from your zombie problem (use
wait or
waitpid), I am not clear what the problem is that you are trying to solve.