in reply to Re^4: Import comma delimited file into an array
in thread Import comma delimited file into an array
You don't have to close FILEHANDLE if you are immediately going to do another "open" on it, because "open" will close it for you. (See "open".) However, an explicit "close" on an input file resets the line counter ($.), while the implicit close done by "open" does not.
Also, there is a good discussion on this topic in the book, Perl Best Practices, Chapter 10 (I/O), in the section titled: "Close filehandles explicitly, and as soon as possible".
|
|---|