open(FH, "$Exec_Cmd 2>&1 |"); while () { print $_; # I have STDERR captured in $_ but then this # does not handle STDIN }