- or download this
# first.pl
open (STDOUT, "| tee -a $LOGFILE") or die "Teeing off: $!\n";
- or download this
# parent.pl
# Preserve the filehandler
...
## No need the screen output to the log file
system("perl child.pl $LOGFILE");
- or download this
# child.pl
$LOGFILE=$ARGV[0];
...
$c_input1=<STDIN>;
print FOUT "\nYou Entered Child Input : $c_input1";
close (FOUT);