#!/usr/bin/perl -w $log_file = "/home/privera/perl/logfile"; open(STDOUT, "| tee $log_file"); print "Testing 1.2.3...\n"; close(STDOUT);