Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Heredoc Inconsistency: Bareword Filehandle vs Lexical Filehandle

by LanX (Saint)
on Jun 09, 2022 at 20:35 UTC ( [id://11144621]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11144621]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-20 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found