|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re^2: When do filehandles close?by pg (Canon) |
| on Jul 22, 2004 at 20:04 UTC ( [id://376761]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
|
|
||||||||||||||||||||||||