in reply to Merging two pipes

When you reopen INPUT (the '>&' symbols are an error) the original is closed. You need to open two distinct filehandles and use four argument select ('perldoc -f select') to read them simultaneously.

It is educational to roll your own select loop, but IO::Select is the way to get it done. 'man IO::Select' will tell you if you already have it, and how to use it.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Merging two pipes
by cmburns (Acolyte) on Oct 25, 2001 at 01:32 UTC
    Thanks to all of you!

    I must admit I didn't make my problem quite clear but your comments put me on the right trail. IO::Select did the trick for me and now my script works like I want it to.