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 [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl v5.8.5: Configured by gerrit at Thu Aug 19 19:39:49 2004. Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=cygwin, osvers=1.5.10(0.11642), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.1 inspiron 1.5.10(0.11642) 2004-05-25 22:07 i686 unknown unknown cygwin ' config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Doptimize=-O2 -Dman3ext=3pm' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-O2', cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='3.3.3 (cygwin special)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='ld2', ldflags =' -s -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldb -lcrypt -lgdbm_compat perllibs=-lcrypt -lgdbm_compat libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' -s -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.8.5: /usr/lib/perl5/5.8.5/cygwin-thread-multi-64int /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/cygwin-thread-multi-64int /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/cygwin-thread-multi-64int /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl . --- Environment for perl v5.8.5: HOME=/Documents and Settings/liz LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/Program Files/Agilent/N2X/Platform/bin:/Program Files/Tcl83/bin:/cygdrive/d/ipcommon/shared/win32_debug:/Program Files/Agilent/RouterTester/bin:/qarobot/tools/ethereal:/gcc-2.95.2/bin:/qarobot/release:/Program Files/Agilent/RouterTester/bin:/vim/vim56:/WINNT/system32:/WINNT:/WINNT/System32/Wbem:/bin:/usr/bin:/cygdrive/d/cerberus/acl/lib/win32_debug:/cygdrive/d/cerberus/acl/lib/win32:/cygdrive/d/cerberus/zlib/lib/win32:/cygdrive/d/cerberus/zlib/lib/win32_debug:/cygdrive/d/cerberus/daytona/bin:/cygdrive/d/Progra~1/Microsoft Visual Studio .NET/Vc7/bin:/cygdrive/d/Progra~1/Microsoft Visual Studio .NET/Common7/IDE:/cygdrive/d/Progra~1/Microsoft Visual Studio .NET/Common7/Tools/Bin:/qatoolkit/bin:/Program Files/Rational/ClearCase/bin:/Program Files/Rational/common:/Program Files/Rational/ClearCase/bin/fix PERL_BADLANG (unset) SHELL (unset)