Cygwin perl not understanding textmode

Dave Korn dk@artimi.com
Wed Mar 31 16:15:00 GMT 2004


> -----Original Message-----
> From: cygwin-owner On Behalf Of Mike Spertus
> Sent: 30 March 2004 20:30

> > On Tue, 30 Mar 2004, Mike Spertus wrote:
> >
> >> I have installed Cygwin with DOS linebreaks (i.e., disks 
> mounted in 
> >> textmode). However, Cygwin perl doesn't seem to understand this as 
> >> shown below. How do I tell Cygwin perl to respect textmode?:
> >>
> >> MPS@MPS-2000 ~
> >> $ od -t x1 foo.txt
> >> 0000000 66 6f 6f 62 61 72 0d 0a 66 6f 6f 62 61 7a 0d 0a 
> 0000020 66 6f 
> >> 6f 62 61 74 0d 0a 0d 0a
> >> 0000032
> >>
> >> MPS@MPS-2000 ~
> >> $ cat ~/foo.txt | perl -e 'while (<>) {print;}' >bar.txt
> >>
> >> MPS@MPS-2000 ~
> >> $ od -t x1 bar.txt
> >> 0000000 66 6f 6f 62 61 72 0d 0d 0a 66 6f 6f 62 61 7a 0d 
> 0000020 0d 0a 
> >> 66 6f 6f 62 61 74 0d 0d 0a 0d 0d 0a
> >> 0000036

  ISTM to have entirely correctly converted LF to CRLF, which is what
textmode means AFAIUI.  What were you hoping for?


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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



More information about the Cygwin mailing list