Re: Trouble with printing newlines to a file
- From: "Peter J. Holzer" <hjp-usenet2@xxxxxx>
- Date: Sun, 13 May 2007 21:16:38 +0200
On 2007-05-13 13:36, Dr.Ruud <rvtol+news@xxxxxxxxxxxx> wrote:
A. Sinan Unur schreef:
Also, if one wants specific characters, it is better to specify them
by their codes rather than using \n whose meaning depends on what the
platform thinks a line ending ought to be.
Using either "\n" of chr(10) or "\x0A" or "\x{0A}" or "\012" or "\cJ"
(etc.) seems to make no difference (on Windows, have not tested OS-X).
Yes, "\n" is the same as "\x0A" on Windows. I think it's the same on
MacOS X, but it was "\x0D" on MacOS <= 9.
I don't know what EBCDIC-based versions of perl use: NL ("\x15") is
probably more natural than LF ("\x25") there.
hp
--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@xxxxxx |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
.
- References:
- Trouble with printing newlines to a file
- From: shaneal
- Re: Trouble with printing newlines to a file
- From: Dr.Ruud
- Re: Trouble with printing newlines to a file
- From: A. Sinan Unur
- Re: Trouble with printing newlines to a file
- From: Dr.Ruud
- Trouble with printing newlines to a file
- Prev by Date: FAQ 6.5 How do I substitute case insensitively on the LHS while preserving case on the RHS?
- Next by Date: Re: Converting 4 bytes to a float
- Previous by thread: Re: Trouble with printing newlines to a file
- Next by thread: Re: Trouble with printing newlines to a file
- Index(es):
Relevant Pages
|