Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: open(TO, "|-") is a bad file name?

by SavannahLion (Pilgrim)
on Feb 24, 2004 at 05:56 UTC ( [id://331322]=note: print w/replies, xml ) Need Help??


in reply to Re: open(TO, "|-") is a bad file name?
in thread open(TO, "|-") is a bad file name?

Hmmm, that is so interesting. I've been banging my head on a typo from the Camel?
After reading your post, I went back and compared
select((select(TO_CHILD), $| = 1))[0]);
between what I wrote and the book. That is exactly as it appears in the 3rd edition of the Camel under Bidirectional Communication on page 432.

Thank you for the $childnum suggestion, but where am I supposed to get that value from? The $pid results in a negative number for me. Searching for $childnum reveals only two nodes. And a search on PerlDoc turns up nothing :(

----
Thanks for your patience.
Prove your knowledge @ HLPD

Replies are listed 'Best First'.
Re: Re: Re: open(TO, "|-") is a bad file name?
by ysth (Canon) on Feb 24, 2004 at 16:34 UTC
    $childnum has no special meaning; I was just suggesting that you loop through the fork code three times, doing different things in the "child" section for each iteration (but making sure the child execs or exits or something rather than continuing the loop.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://331322]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found