delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/18/23:01:13

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: Fri, 19 Jul 2002 10:59:32 +0800
From: Greg Matheson <lang AT ms DOT chinmin DOT edu DOT tw>
To: cygwin AT cygwin DOT com
Subject: perl-5.8.0 breaks code "working" on 5.6.1 over "\n"
Message-ID: <20020719105932.A11717@ms.chinmin.edu.tw>
Mail-Followup-To: cygwin AT cygwin DOT com
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i

Code in Mark Overmeer's Mail::Box perl modules compares internal
representations of mail with those stored on disk by checking 

length "strings" 

and 

-s FILEHANDLES

In Unix his tests work, because they both return the number of
bytes used, with \n as one byte. On Cygwin, they were too, at
least with perl-5.6.1, because they were both counting the CRLFs
as two bytes, even installing cygwin for both Unix and DOS format
text files (if my attempts to reinstall cygwin with DOS text file
mounts were working).

Now, 5.8.0's length is counting correctly, that is one less than it was
before for each \n, but the -s operator is still counting two for
\n.

I think it has something to do with the new PerlIO. See perldoc
perldelta for details.

-- 
Greg Matheson               Learn a third language and 
Chinmin College             be born again, again.
                       
Taiwan Penpals Archive <URL: http://netcity.hinet.net/kurage>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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