delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/04/16:25:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 4 Nov 2004 16:26:08 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Perl binmode problem on text mount
Message-ID: <20041104212608.GC16067@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <41897FF4 DOT 1080501 AT agilent DOT com> <418A9BF3 DOT 5010903 AT familiehaase DOT de>
Mime-Version: 1.0
In-Reply-To: <418A9BF3.5010903@familiehaase.de>
User-Agent: Mutt/1.4.1i

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019