in reply to Re: Re: Do I need local $
in thread Do I need local $

Thanks for your answer, I saw this post in a newsgroup...

Does this mean that the file will only close when the application closes or if I manually call it?

-----------------------------------------------------------

> You mentioned the IO::File DESTROY method trying to cleanup the file
> descriptors ...
>
> .. DESTROY method is coded to be a no-op, leaving any clean up to
> perl's handling of the closing of a file.

Oops, busted.

IO::File's DESTROY is a no-op in perl 5.6 (inherited from IO::Handle).

I didn't actually look at the DESTROY method for IO::File. I had just
assumed that the object was being destructed properly. (Well, it wasn't
all assumption ... there was a little empirical testing going on too.
:-) My phrasing was mainly meant to express, "high-level cleanup seems
to be coded correctly".

Sorry for the confusion.



-- Robert Trace