P is for Practical | |
PerlMonks |
Re^2: When do filehandles close?by pg (Canon) |
on Jul 23, 2004 at 00:04 UTC ( [id://376761]=note: print w/replies, xml ) | Need Help?? |
Missed one little thing;-) as the OP already pointed out, reopen implicitly close a file handler. However in this case $. (current line number for the last filehandle accessed) is not reset. I would prefer explicit close all the time simply because of this. UpdateJust add a piece of code for demon (name this script a.pl):
Try to comment or uncomment that close. If it is commented, print out:
If it is not commented:
In Section
Seekers of Perl Wisdom
|
|