www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/28/04:47:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: Wed, 28 May 2003 10:48:43 +0200
From: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
Reply-To: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <119511878602.20030528104843@familiehaase.de>
To: nicebounce AT trodman DOT com
CC: cygwin AT cygwin DOT 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 DOT h4RHsXTK006079 AT tigris DOT pounder DOT sol DOT net>
MIME-Version: 1.0

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/

- Raw text -


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