Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am using something like:
Meanwhile, If I try:open(FH, "$Exec_Cmd 2>&1 |"); while (<FH>) { print $_; # I have STDERR captured in $_ but then this # does not handle STDIN }
Can anyone please tell me how can I capture STDERR as well handle STDIN simultaneously.open(FH, "$Exec_Cmd 0>&2 |"); while (<FH>) { print $_; # I take care of STDIN but then this # does not handle STDERR }
Thanks and Regards, Tony
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Handling STDERR and STDIN in Perl
by jeffa (Bishop) on May 09, 2004 at 15:14 UTC | |
by Anonymous Monk on May 10, 2004 at 05:55 UTC | |
|
Re: Handling STDERR and STDIN in Perl
by dave_the_m (Monsignor) on May 09, 2004 at 15:13 UTC | |
|
Re: Handling STDERR and STDIN in Perl
by zentara (Cardinal) on May 10, 2004 at 12:58 UTC |