my $pid = open3 ....; print "# $_" while <$out>; print "# $_" while <$err>; waitpid $pid, 0;