New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description in perlport of the meaning of \n #9670
Comments
From mail@gunnar.ccThis is a bug report for perl from mail@gunnar.cc, The second para in the Newlines section of perlport.pod describes Inline Patch--- /usr/lib/perl5/5.10.0/pod/perlport.pod 2008-04-18 22:48:31.000000000 -0400
+++ perlport.pod 2009-03-03 13:21:21.000000000 -0500
@@ -88,11 +88,11 @@
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> means C<\012>, but when
+accessing a file, by default a :crlf layer is pushed which will
+result in C<\015\012> appearing in the file. 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
-----------------------------------------------------------------
---
Site configuration information for perl 5.10.0: Configured by root at Sat Apr 19 00:09:44 EDT 2008. Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Locally applied patches: @INC for perl 5.10.0: Environment for perl 5.10.0: |
From @tamiasOn Tue, Mar 03, 2009 at 10:56:55AM -0800, Gunnar Hjalmarsson wrote:
I find that this new text is less clear than the original. In particular, Ronald |
The RT System itself - Status changed from 'new' to 'open' |
From mail@gunnar.ccRonald J Kimball via RT wrote:
Ok, I see what you mean. It was taken directly from this message: http://groups.google.com/group/comp.lang.perl.misc/msg/7d6ca2e5eef111c5 Then how about: In DOSish perls, C<\n> means C<\012>. When reading a file in "text" Best regards, Gunnar |
From @briandfoyFixed by commit 51d9476 |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#63620 (status was 'resolved')
Searchable as RT63620$
The text was updated successfully, but these errors were encountered: