$ perl -e'print "Captured $_" for `./asdf 2>&1`;' Captured line 1 Captured line 2 Captured line 3 Captured line 4