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:
When's the last time you used duct tape on a duct? --Larry Wall
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
In Section
Seekers of Perl Wisdom