Chas. Owens wrote:
>
On Dec 12, 2007 1:00 AM, jeff pang <[EMAIL PROTECTED]> wrote:
snip
You can add a "\n" (or "\r\n" on windows,etc) at the end of each
element in the array,like,
snip
In Perl, "\n" is not linefeed, it is the newline character. It
translates to the proper sequence of characters on each operating
system, so "\r\n" on a Win32 system is actually three bytes: 0x0d,
0x0d, and 0x0a. You can find more information in perldoc perlport
under Newlines in the ISSUES section or
http://perldoc.perl.org/perlport.html#Newlines
What "\n" 'is' depends on what you mean. According to Perl itself "\n"
is one byte long and that byte has the value 0x0A, or ASCII LF. What is
special about it is that Perl sees it as the output record terminator
character, and by default will translate it to other character sequences
on output according to the current platform.
To say 'it is the newline character' is meaningless until you have said
what 'the newline character' is. To say "\r\n" 'is' three bytes is
misleading: on a Windows system, printing "\r\n" will output
<CR><CR><LF> by default.
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/