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]