This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Perl binmode problem on text mount


On Thu, Nov 04, 2004 at 10:15:31PM +0100, Gerrit P. Haase wrote:
>Earl Chew wrote:
>
>>This code used to work on Perl 5.6.1-2 on Cygwin 1.3.10.
>>
>>I've now moved to Perl 5.8.5-3 on Cygwin 1.5.11.
>>
>>Here is the Perl program:
>>
>>    binmode STDOUT;
>>    print "Hello\n";
>>
>>1. Output to file on text mount
>>
>>    perl foo.pl > foo.txt ; od -c foo.txt
>>
>>    0000000  H e l l o \r \n    # Perl 5.8.5-3 Cygwin 1.5.11
>>    0000000  H e l l o \n        # Perl 5.6.1-2 Cygwin 1.3.10
>>
>>2. Output to file via cat
>>
>>    perl foo.pl | cat > foo.txt ; od -c foo.txt
>>
>>    0000000  H e l l o \n        # Perl 5.8.5-3 Cygwin 1.5.11
>>    0000000  H e l l o \n        # Perl 5.6.1-2 Cygwin 1.3.10
>>
>>Has anyone else experienced the same issue?
>
>Actually it is not perl writing \r here:
>
>$ perl ./binmode.pl | od -c
>0000000   H   e   l   l   o  \n
>0000006

Pipes are binmode by default.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]