in reply to Re: Heredoc Inconsistency: Bareword Filehandle vs Lexical Filehandle
in thread Heredoc Inconsistency: Bareword Filehandle vs Lexical Filehandle

In such a case I'd rather prefer direct object syntax.

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

  • Comment on Re^2: Heredoc Inconsistency: Bareword Filehandle vs Lexical Filehandle
  • Download Code