Subject: | Redirecting stdout/stderr to file handle doesn't work |
run3(\@cmd, $in, $out, $err)
doesn't do "the right thing" when $out or $err is a file handle
(either GLOB ref or IO::Handle). Apparently there's a case
missing from _fh_for_child_output, e.g.
if ( $type eq "SCALAR" && $dest == \undef ) {
...
}
+ elsif ( $type eq "FH" ) {
+ $fh = $dest;
+ warn "run3(): redirecting $what to filehandle '$dest'\n"
+ if debugging >= 2;
+ }
elsif ( !$type ) {
...