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

Re: Catching errors in closing lexical filehandles

by ikegami (Pope)
on Sep 27, 2004 at 14:32 UTC ( #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
Node Status?
node history
Node Type: note [id://394178]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2020-06-06 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (41 votes). Check out past polls.

    Notices?