# New Ticket Created by  Sam S. 
# Please include the string:  [perl #127092]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127092 >


When called on a string, the .lines method ignores/chomps only *one* trailing 
newline, and treats all other newlines as line separators:

    dd "\n\n\n".lines;    # ("", "", "").Seq

However, when called on an IO::Path or IO::Handle, it ignores/chomps up to 
*two* trailing newlines:

    spurt 'a', "\n\n\n";
    dd 'a'.IO.lines;      # ("", "").Seq
    dd open('a').lines;   # ("", "").Seq

Expected behavior: All three examples should print ("", "", "").Seq.

Reply via email to