{ local *STDOUT; open(STDOUT, "> $LogFile") || die "Failed: $!"; print STDOUT "Blah"; } print "This should appear on the console window again";