in reply to 3 questions... 2 about newlines, and one on how to be NICE
There's a long section on this is the perlport manpage (perl portability).
The "\n" is just a representation of an actual bit pattern, and that bit pattern my be different from system to system. It's a "logical newline", so it ends up being what that system needs as a newline.
Some things that really care about the bit patterns (such as protocol modules) sometimes specify the exact bit sequence they want instead of relying on a logical representation.
# from CGI.pm $EBCDIC = "\t" ne "\011"; if ($OS eq 'VMS') { $CRLF = "\n"; } elsif ($EBCDIC) { $CRLF= "\r\n"; } else { $CRLF = "\015\012"; }
As for annotating the end of your problem, you could post a thank you with a summary of which answers helped you figure out the solution (or even which didn't). :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 3 questions... 2 about newlines, and one on how to be NICE (bad rumors)
by tye (Sage) on Jan 11, 2005 at 04:02 UTC | |
by brian_d_foy (Abbot) on Jan 11, 2005 at 05:56 UTC |