Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Feeding processes through one pipeby sundialsvc4 (Abbot) |
on May 07, 2012 at 20:20 UTC ( [id://969325]=note: print w/replies, xml ) | Need Help?? |
Unfortunately for you, you dropped straight into “implementation mode” on this particular project ... creating a “solution” in terms of Unix pipes and what-not, and then encountering a problem and then immediately setting-out to debug it ... all without first checking yourself and asking, “Wait a minute, hasn’t this whole thing surely been done before? Am I really, like, the first human on this planet to have tried to do this?” Had you done so, alas, you would have very quickly discovered how very thoroughly the answers were: “Yes, and No.” In the purely abstract sense, your actual requirement consists of sending “requests” to a pool of “worker processes,” such that the exact methodology for doing so is almost entirely unimportant to your requirement “so long as it works.” You therefore now find yourself, I am sorry to say, in the unenviable (but very common) position of having attempted to re-invent not only one but several dozen possible wheels.
Actum Ne Agas: Do Not Do A Thing Already Done. It is a very tough “lesson learned.” And I surely would soften the blow if I could. Trust me, if you can, that I do not mean you shame. If you start or end anything with Perl, then start and end here: http://search.cpan.org. Start with the assumption that anything you are now setting out to do, has already been done, and that your true objective therefore is to discover it. (And if this notion turns your entire perspective topsy-turvy, then (lo!!) I have just returned to you three of your work-days and all of your weekends.)
In Section
Seekers of Perl Wisdom
|
|