Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Print Behavior with Carriage Returnby haukex (Archbishop) |
on Jan 05, 2020 at 18:33 UTC ( [id://11110994]=note: print w/replies, xml ) | Need Help?? |
chomp will then remove both line ending characters. Nitpick: I/O layers don't change the behavior of chomp, it will continue to remove $/, which is typically one character, "\n", even on Windows. The I/O layer converts \r\n to \n when reading, so the strings end in just "\n" before they are even touched by chomp.
In Section
Seekers of Perl Wisdom
|
|