| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| X-MimeOLE: | Produced By Microsoft Exchange V6.0.4417.0 |
| content-class: | urn:content-classes:message |
| MIME-Version: | 1.0 |
| Subject: | Bug In Mount? (Bug in read()?) |
| Date: | Mon, 29 Jan 2001 16:06:34 -0800 |
| Message-ID: | <67677D360C1FD411BB4000B0D02080418031DC@eqexchange.equildom.equilibrium.com> |
| Thread-Topic: | Bug In Mount?, Was [Odd/New Perl Behavior] |
| Thread-Index: | AcCHHD2NCOluSg3GTLaPlDux7XYYyADEBt9g |
| From: | "Josh Schulte" <jschulte AT equilibrium DOT com> |
| To: | "Earnie Boyd" <cygwin AT cygwin DOT com>, <cygwin AT cygwin DOT com> |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id TAA23328 |
Correct me if I am wrong. \r\n are at the end of every line in a dos
text file. mounting stuff in binmode causes calls to the system call
read() to return the line as if there was only a \n at the end. mounting
stuff in textmode causes calls to the system call read() to return the
line as if there was only a \n at the end.
I am getting \r\n regardless of what mode I have the directories mounted
as when I read from perl, as demonstrated by the script below. I have
recreated the problem on two computers now. Can anyone else recreate
this problem? Is it a bug in cygwin?
There is only one perl on my system. (Earnie: The /usr/local/bin/perl is
a link I create for backward compatability in some of my other scripts.)
I did a search of the entire system just to double check. So that is not
the problem.
Thanks for any help,
Josh
> PERL SCRIPT
> -----------
>
> #!/usr/local/bin/perl
>
> @what = split(/\n/, `cat contents`);
>
> foreach $line (@what)
> {
> print "***>$line<-\n";
> }
>
> CONTENTS OF FILE
> ----------------
>
> line one
> line two
> line three
>
MY RESULTS:
-----------
<-*>line one
<-*>line two
<-*>line three
-----Original Message-----
From: Earnie Boyd [mailto:earnie_boyd AT yahoo DOT com]
Sent: Thursday, January 25, 2001 2:13 PM
To: Josh Schulte
Cc: cygwin AT cygwin DOT com
Subject: Re: Bug In Mount?, Was [Odd/New Perl Behavior]
Could be that you have \r\n in your contents file. Could be that you've
more than one version of perl installed. Note, the current perl is
located at /usr/bin/perl not /usr/local/bin/perl.
Cheers,
Earnie.
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |