in reply to (tye)Re2: Wierd filehandle call
in thread Wierd filehandle call
The edge case is not as bad a problem as you stated because I used local (not my because I was localizing a glob). However that does explain why the person only returned the IO part of the glob. (Of course I just store my filehandles in lexical variables.)
And I don't understand why you think that properly closing the filehandle. I just do not issue a close anywhere, but instead store the glob in a lexical variable, and when the last reference to the open filehandle goes away, the close will happen. Or in old-style Perl you just use local on your typeglobs and again it works just fine.
At least it works fine for as long as Perl keeps its reliable destruction semantics around...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re3: Wierd filehandle call
by tye (Sage) on Apr 04, 2001 at 22:43 UTC |