in reply to Capture Exit Code Using Pipe & Tee
chop (my $status = `((make -f $params 2>&1 3>&-; echo \$? >&3 ) | tee +-a build.log 1>&2 3>&- ) 3>&1`); print "make exit status: $status\n";
update: added backslash to escape $?
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
---|