Well, I'm glad we've all learned something about "-|", but to get to the original subject line: "Capturing output from Child processes", I think the crux shows up in a couple of your replies to replies...
Yea, open with the command doesn't give me any errors but I have yet to get any output from the child...
...the children are packet simulators that never shut down...
So, maybe the problem is that you are trying to read from the child processes in a line-oriented fashion -- i.e. $/ is left at its default value ("\n"), and you're doing:
while(<$pid>) { ... }
And then maybe these children are never producing anything that looks like "\n"? I don't know -- maybe if you show some more of your code, it'll help.
Or maybe if you set "$/" to an integer value, so each read would return as soon as the specified number of bytes was available. (There's a possibly relevant discussion of this method in this SoPW thread.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.