Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Moose and File::Temp

by ColonelPanic (Friar)
on Nov 19, 2012 at 12:41 UTC ( #1004525=note: print w/ replies, xml ) Need Help??


in reply to Moose and File::Temp

When a filehandle reference is contained in something more complex than a simple scalar variable, it has to be surrounded by braces:

print {$self->{tempfile}} "I am here";

Otherwise, the interpreter doesn't realize that is a filehandle.

Some, though not all, monks consider it a good practice to always use braces for filehandle references.



When's the last time you used duct tape on a duct? --Larry Wall


Comment on Re: Moose and File::Temp
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-12-22 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (114 votes), past polls