This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: printf "\n"|perl -pe '1;'|od -a #perl 5.8 converts to *DOS* text :-<
- From: "Gerrit P. Haase" <freeweb at nyckelpiga dot de>
- To: nicebounce at trodman dot com
- Cc: cygwin at cygwin dot com
- Date: Wed, 28 May 2003 10:48:43 +0200
- Subject: Re: printf "\n"|perl -pe '1;'|od -a #perl 5.8 converts to *DOS* text :-<
- Organization: Esse keine toten Tiere
- References: <200305271754.h4RHsXTK006079@tigris.pounder.sol.net>
- Reply-to: "Gerrit P. Haase" <freeweb at nyckelpiga dot de>
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/