in reply to A Few Questions About IO::File
According to module documentation on IO::File on CPAN undef $fh closes the file automatically. In contrast to Python, in Perl there is more than one way to do it. So both of your options are valid.
getlines comes from IO::Handle and is safe in list context according to its documentation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A Few Questions About IO::File
by rpetrelli (Novice) on Mar 18, 2013 at 14:58 UTC | |
by tobyink (Canon) on Mar 18, 2013 at 15:19 UTC | |
by rpetrelli (Novice) on Mar 18, 2013 at 15:26 UTC | |
by tobyink (Canon) on Mar 18, 2013 at 16:08 UTC | |
by rpetrelli (Novice) on Mar 19, 2013 at 00:45 UTC | |
by Anonymous Monk on Mar 18, 2013 at 15:29 UTC | |
by rpetrelli (Novice) on Mar 18, 2013 at 15:36 UTC | |
by hdb (Monsignor) on Mar 18, 2013 at 15:19 UTC | |
by tobyink (Canon) on Mar 18, 2013 at 15:30 UTC |