Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Print Behavior with Carriage Return

by haukex (Archbishop)
on Jan 05, 2020 at 18:33 UTC ( [id://11110994]=note: print w/replies, xml ) Need Help??


in reply to Re: Print Behavior with Carriage Return
in thread Print Behavior with Carriage Return

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110994]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found