Planning ahead for Perl 6, and after reading this thread, it seems best to get used to calling close() explicitly. AFAICT, in Perl 6, by default, the file handle will not get closed until a Dead Object Detection (DOD) run is triggered, which is not guaranteed to happen on scope exit.
This is because Parrot will replace Perl 5's simple reference counting with full garbage collection. Though languages (such as Perl 5) that run on Parrot can implement traditional Perl 5-style reference counting/timely destruction semantics, it seems likely that doing so will incur a performance penalty (triggering a DOD run on scope exit, for instance).
In reply to Re: Catching errors in closing lexical filehandles
by eyepopslikeamosquito
in thread Catching errors in closing lexical filehandles
by gaal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |