This is the mail archive of the
mailing list for the Cygwin project.
perl textmode newline problem
- From: Peter Westerstrom <peterw at eonreality dot se>
- To: cygwin-apps at cygwin dot com
- Cc: Peter Westerstrom <peterw at eonreality dot se>
- Date: Thu, 04 Sep 2003 21:55:52 +0200
- Subject: perl textmode newline problem
- Organization: EON Development AB
I can't get perl to write files in text mode with correct line feeds.
My perl program:
open(F, "> test.txt") or die "can't open file";
print F "Foo\n";
print F "Bar\n";
Outputs newlines as 0x0A.
But my C program:
int main(int argc, char** argv)
FILE *fp = fopen("test3.txt", "w");
Writes newlines as 0x0D 0x0A. Same output dir.
All my mounts is in textmode. CYGWIN is empty. I'm using perl 5.8.0-5
and cygwin 1.5.3-1.
I recently upgraded cygwin and got this behavoiur. Before it was
correctly outputting text with 0x0D 0x0A.
What can be the problem? A bug in perl? By design change in cygwin perl?