Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 28 May 2003 10:48:43 +0200
From: "Gerrit P. Haase" <freeweb@nyckelpiga.de>
Reply-To: "Gerrit P. Haase" <freeweb@nyckelpiga.de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <119511878602.20030528104843@familiehaase.de>
To: nicebounce@trodman.com
CC: cygwin@cygwin.com
Subject: Re: printf "\n"|perl -pe '1;'|od -a #perl 5.8 converts to *DOS* text :-<
In-Reply-To: <200305271754.h4RHsXTK006079@tigris.pounder.sol.net>
References: <200305271754.h4RHsXTK006079@tigris.pounder.sol.net>
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit

nicebounce schrieb:

> --------
> IMHO the perl v5.6.0 that came w/1.3.20 worked correctly.
> In the test case below perl 5.8.0 is converting UNIX text to 
> DOS text - (this is breaking our old scripts).

> Comments please.

> --
> thanks/regards,
> Tom
> # run below to get my address:
> perl -e 'print unpack("u", "\.\=\$\!T\<F\]D\;6\%N\+F\-O\;0H\`");' 

> --v-v------------------C-U-T---H-E-R-E-------------------------v-v--
> bash-2.05b$ uname -r
> 1.3.20(0.73/3/2)
> bash-2.05b$ printf "\n"|perl -pe '1;'|od -a
> 0000000  nl
> 0000001
> bash-2.05b$ perl -v|grep 'This is'
> This is perl, v5.6.1 built for cygwin-multi
> --v-v------------------C-U-T---H-E-R-E-------------------------v-v--
> bash-2.05b$ uname -r
> 1.3.22(0.78/3/2)
> bash-2.05b$ printf "\n"|perl -pe '1;'|od -a
> 0000000  cr  nl
> 0000002
> bash-2.05b$ perl -v|grep 'This is'
> This is perl, v5.8.0 built for cygwin-multi-64int

Since Cygwin runs on Windows and Windows is a DOS system the PERLIO
layer crlf is default.

$ export PERLIO=unix

$ printf "\n"|perl -pe '1;'|od -a
0000000  nl
0000001

$ export PERLIO=stdio

$ printf "\n"|perl -pe '1;'|od -a
0000000  nl
0000001

$ export PERLIO=perlio

$ printf "\n"|perl -pe '1;'|od -a
0000000  nl
0000001

$ export PERLIO=crlf

$ printf "\n"|perl -pe '1;'|od -a
0000000  cr  nl
0000002

$ export PERLIO=utf8

$ printf "\n"|perl -pe '1;'|od -a
0000000  nl
0000001

$ export PERLIO=bytes

$ printf "\n"|perl -pe '1;'|od -a
0000000  nl
0000001

$ export PERLIO=raw

$ printf "\n"|perl -pe '1;'|od -a
0000000  nl
0000001

$ export PERLIO=pop

$ printf "\n"|perl -pe '1;'|od -a
0000000



Please see perldoc perlio for details.


Gerrit
-- 
=^..^=


--
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/

