in reply to script and its output on different handles
open my $SCRIPT, 'aPerlScript.pl 1 2 |' or die $!; while (<$SCRIPT>) { print; log($logfile, $_); } [download]