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

Re^2: Implicit closing of files

by rovf (Priest)
on Jun 17, 2008 at 11:09 UTC ( [id://692467]=note: print w/replies, xml ) Need Help??


in reply to Re: Implicit closing of files
in thread Implicit closing of files

By using a bareword, the author of the previous code is effectively using a package variable to store the filehandle.

Hmmmm.... This does not directly relate to my question as about whether or not Perl closes the local file handle properly at the end of the block, but as to the risks of bareword file handles, I think the only risk would be if I call in my block a function, which in turn would use a non-localized filehandle of the same name.

The file handle I as using, certainly can not close another open file handle of the same name, because it is localized.

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^3: Implicit closing of files
by andreas1234567 (Vicar) on Jun 17, 2008 at 11:14 UTC
    The file handle I [am] using [..] is localized.
    Sorry, I overlooked that.
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-19 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found