$| = 1; # don't buffer output open( SH, '-|', 'someshellscript.sh' ) or die "Can't run someshellscript.sh: $!"; while () { print; }