http://www.perlmonks.org?node_id=1051947


in reply to Re: Console output != file output
in thread Console output != file output

He should be doing 3 arg open and would be best if he change that file handle to a var. Just some best practices.

use warnings; use strict; my $type = 123; my $FH; open ($FH, '>', 'out.txt'); print $FH ("start" . $type . "end"); close $FH;