Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Moose and File::Temp

by ColonelPanic (Friar)
on Nov 19, 2012 at 12:41 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2025-11-13 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.