In you initial post, you wondered how many processes it might take to exhaust an average PC. From this I surmise you are not running under UNIX, but some form of Windows?
If so, you may want to investigate using a threading version of Perl, and create threads rather than forking entire processes (which is a far more expensive operation on a Windows box -- even NT/2000 -- than on UNIX). With threads, you'll have to guard access to your variables, but all threads share them, so there is no need for pipes or file handles.
I realize this post is short on details, but if your curiosity is piqued enough, you should investigate this approach further on your own. ActiveState's ActivePerl doesn't support the threading model, but if you compile Perl yourself from source, you can enable it.
dmm
If you GIVE a man a fish you feed him for a day
But, TEACH him to fish and you feed him for a lifetime
| [reply] |
You can return information to the parent via a number of methods. The common way is simply as a return code, or using pipes. Setting global variables, though, is problematic and won't allow you to scale up your solution.
Look up IPC (inter-process communication) and decide on which method is best for your program.
| [reply] |