in reply to Fork multi processes

Without trying to be too disparaging or insulting on the matter, the simple fact remains that this requirement definitely is something that has already been done.   For instance, the git version-control system quite routinely launches parallel processes or threads to do this sort of thing.   Therefore, we can quite reliably say that the necessary code to do this has been done before; as, in fact, we see that it has.

This I learned from a cereal box:  

Actum Ne Agas:   Do Not Do A Thing Already Done.™”

Always start, and usually end, your quest at http://search.cpan.org.   You’ll find everything but the Bundle:::InterchangeKitchenSink in there if you look around long enough.   No matter what you are doing, you are emphatically not the first one to have done it by now, and you can and should always seek to leverage that fact to your fullest advantage.   Perl CPAN is especially rich in opportunities to do that.

So, in that respect, “it’s not ‘exactly like C,’” and this is a difference that makes all the difference in the world.   I submit (and I trust you can reasonably guess the intended extent of my point) that we do not embrace this language system because of what it enables us to write, but rather, for what it enables us to avoid writing.   Pre-hung doors and prefabricated windows; fully assembled kitchen appliances; furnished apartments with well-stocked wine cabinets.

Replies are listed 'Best First'.
Re^2: Fork multi processes
by JavaFan (Canon) on May 04, 2012 at 20:04 UTC
    Programmers that need to run to CPAN, or at first impulse turn to CPAN at even the most trivial task are little more than script kiddies without much understanding, and, when being interviewed for a job, will be filtered out and discarded at the first opportunity.

    Typing in 'fork' and 'wait' hardly takes more effort than searching on CPAN, downloading it, reading the documentation, and then typing in the necessary code so the module can do the trivial task for you. And going the CPAN route robs you from the opportunity to learn some basic coding skills.

    Do Not Do A Thing Already Done.
    So, if today I use a module that helps me spawn 6 children, but never more than 5 at a time, and tomorrow I have another program that needs to spawn 6 children, but never more than 5, I should not use this module, cause that means doing a thing already done?

    Can I at least use use strict; more than once?

      You better use strict; at least once per child or you'll wind up with a bunch of young thugs ;^)