in reply to Re: Heredoc Inconsistency: Bareword Filehandle vs Lexical Filehandle
in thread Heredoc Inconsistency: Bareword Filehandle vs Lexical Filehandle
C:\tmp>perl use warnings; use strict; my $hfile = 'foo.txt'; my $HFILE; # GOOD open($HFILE, '>', $hfile) or die "$hfile: $!"; $HFILE->print(<< "#EOT"); #Usage: foo.pl #EOT __END__ C:\tmp>type foo.txt #Usage: foo.pl
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|