in reply to Parsing STDERR and STDOUT at the same time
You can redirect STDERR to STDOUT using the shell.
my $cvs_cmd = "cvs rlog -r$OLD::$NEW -SN $module"; my $cvs_pid = open my $cvs_pipe, '-|', "$cvs_cmd 2>&1" or die "Can't read pipe: $!";
Then read from $cvs_pipe like any other file handle. The STDERR output will be mixed in with the STDOUT output.
I hear IPC::Run is good for this kind of thing, but I've never used it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing STDERR and STDOUT at the same time
by qazwart (Scribe) on Feb 02, 2007 at 15:49 UTC |