my $command="/usr/bin/testscript open(my $cmd,'-|',$command); my $line=""; while ($line = <$cmd>) { print $line . "\n"; }