Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Catching errors in closing lexical filehandles

by ikegami (Patriarch)
on Sep 27, 2004 at 14:32 UTC ( [id://394178]=note: print w/replies, xml ) Need Help??


in reply to Catching errors in closing lexical filehandles

As an aside, that snippet works in 5.6.1, and as far as I know, worked with much earlier versions too. What was introduced in in 5.8.0 was the ability to use a reference for the filename as an alternative to IO::Scalar.
  • Comment on Re: Catching errors in closing lexical filehandles

Replies are listed 'Best First'.
Re^2: Catching errors in closing lexical filehandles
by gaal (Parson) on Sep 27, 2004 at 14:57 UTC
    On 5.005_03, you'd get a "Can't use an undefined value as filehandle reference" error at compilation. Hence the gensym.
      I see, thanks! good to know what works and doesn't work in which version. I'm so used to using FileHandle, which uses gensym.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-30 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found