This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Perl gets \r in strings even in text mode


I'm currently having problems with Perl returning strings with CRLFs in 
rather than just LFs, even when read in text mode, from a text-mode mount 
point.

For example, the following script:

#! /usr/bin/perl

while (<>) {
  if (m/\r\n/) { print "CRLF\n"; }
}

when saved to test.pl and run on a normal multi-line DOS text file prints 
"CRLF" lots of times, even when run on a DOS text file in a 
text-mode-mounted directory.

This is repeatable on different machines; I'm using cygwin-1.3.2-1 (not the 
latest, I know, but 1,3.3 has serious problems for me because of the 
segfault-triggered-by-recursive-make bug) and perl-5.6.1-2.

-- 
http://sc3d.org/rrt/ | Si hoc legere scis nimium eruditionis habes (Anon)

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]