Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix lines() returning an empty line at EOF
IO::Handle::lines now behaves exactly like Perl 5's: lines on a file containing "" will return 0 lines. lines on a file containing "\n" will return one line containing "". lines on a file containing "foo" will return one line containing "foo". lines on a file containing "foo\n" will return one line containing "foo". lines on a file containing "foo\nbar" will return two lines. With .chomp set to False on the handle the behavior is the same except for the \n still there if it was in the input file.
- Loading branch information
Showing
1 changed file
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters