Steve Peters via RT wrote: >>[quietdragon - Fri Nov 05 15:59:26 2004]: >> >>This is a bug report for perl from earl_chew@agilent.com, >>generated with the help of perlbug 1.35 running under perl v5.8.5. >> >> >>----------------------------------------------------------------- >>[Please enter your report here] >> >>Perl v5.8.5 does not correct set cygwin binmode when dealing >>with STDOUT vs a disk file: >> >> binmode STDOUT; >> print "Hello\n"; >> >>Perl v5.6.1 does not have this problem: >> >>perl foo.pl > foo.txt ; od -c foo.txt ; ls -l foo.txt >> >> 0000000 H e l l o \r \n # Perl 5.8.5-3 Cygwin 1.5.11 >> -rw-r--r-- 1 earl mkpasswd 7 Nov 4 11:10 foo.txt >> >> >> 0000000 H e l l o \n # Perl 5.6.1-2 Cygwin 1.3.10 >> -rw-r--r-- 1 earl mkpasswd 6 Nov 4 11:14 foo.txt >> >> >> 0000000 H e l l o \n # Perl 5.6.1-2 Cygwin 1.5.11 >> -rw-r--r-- 1 earl mkpasswd 6 Nov 4 11:14 foo.txt >> >>The file sizes reported by ls confirm the extra \r reported by od. >> >>This problem can also be reproduced by using on a text mount: >> >>perl -e 'open OUT,">q.txt";binmode OUT;print OUT "Hello\n"' >>perl -e 'binmode STDOUT;print STDOUT "Hello\n"' > q.txt >> >>The output in q.txt (held on a text mount) differs between the >>two invocations. This is described in more detail in: >> >>http://www.cygwin.com/ml/cygwin/2004-11/msg00192.html >>http://www.cygwin.com/ml/cygwin/2004-11/msg00198.html >> >>and in the thread beginning: >> >>http://www.cygwin.com/ml/cygwin/2004-11/msg00131.html >> > > > I was not able to repliate this problem with the stock Cygwin Perl on > the Cygwin/XP environment. > > $ perl foo.pl > foo.txt ; od -c foo.txt ; ls -l foo.txt > 0000000 H e l l o \n > 0000006 > -rw-r--r-- 1 STEVE group 6 Nov 12 2004 foo.txt It fails when you are doing this in a textmode mounted direcotory. `mount | grep sandbox' shows what? IOf not textmode mounted, please try again after: $ mount -s -f -t X:/home/STEVE/sandbox /home/STEVE/sandbox Gerrit -- =^..^=