in reply to A challenge...at least for me.

Make this
pipe(*A,*B); $child1=fork; $child2=fork; close B; while(<A>){ react }
where *every* child writes to B, only the message is formatted to distinguish the children.

Replies are listed 'Best First'.
Re: Re: A challenge...at least for me.
by snafu (Chaplain) on Jun 06, 2001 at 22:46 UTC
    This looks very promising, however, don't you mean every child writes to A instead of B? (because it seems like you are closing B and then reading from A). Am I misinterpretting your code somehow?

    ----------
    - Jim

      A pipe links two Filehandles thus: What you syswrite into B can you read in A (or the other way around, I haven't the doku handy). Think of it as a pipe (Name says it all). On a water pipe you don't fill the tap to get water out of it, you use the other end. BTW the code was for the parent.