From: brian d foy Date: Thu, 24 Sep 2009 22:06:04 +0000 (-0500) Subject: * RT #63620: Refer to the :crlf layer instead of STDIO for line ending translations X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=51d9476f59194f5f7559ec77351329963b330df8;p=p5sagit%2Fp5-mst-13.2.git * RT #63620: Refer to the :crlf layer instead of STDIO for line ending translations --- diff --git a/pod/perlport.pod b/pod/perlport.pod index 88c6e8f..f44ae69 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -88,11 +88,11 @@ and S uses C<\015>. Perl uses C<\n> to represent the "logical" newline, where what is logical may depend on the platform in use. In MacPerl, C<\n> always -means C<\015>. In DOSish perls, C<\n> usually means C<\012>, but -when accessing a file in "text" mode, STDIO translates it to (or -from) C<\015\012>, depending on whether you're reading or writing. -Unix does the same thing on ttys in canonical mode. C<\015\012> -is commonly referred to as CRLF. +means C<\015>. In DOSish perls, C<\n> usually means C<\012>, but when +accessing a file in "text" mode, perl uses the C<:crlf> layer that +translates it to (or from) C<\015\012>, depending on whether you're +reading or writing. Unix does the same thing on ttys in canonical +mode. C<\015\012> is commonly referred to as CRLF. To trim trailing newlines from text lines use chomp(). With default settings that function looks for a trailing C<\n> character and thus