delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/08/21:12:02

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
To: Jason Tiller <jtiller AT sjm DOT com>
Cc: <cygwin AT cygwin DOT com>
Subject: Re: 'chop' and text mounts
References: <Pine DOT WNT DOT 4 DOT 32 DOT 0103081659110 DOT -294355 AT tiller2 DOT ventritex DOT com>
From: Jon Ericson <Jonathan DOT L DOT Ericson AT jpl DOT nasa DOT gov>
Date: 09 Mar 2001 02:11:11 +0000
In-Reply-To: <Pine.WNT.4.32.0103081659110.-294355@tiller2.ventritex.com>
Message-ID: <86k85zhetc.fsf@jon_ericson.jpl.nasa.gov>
Lines: 17
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)
MIME-Version: 1.0

Jason Tiller <jtiller AT sjm DOT com> writes:

> I have a feeling this is an extremely trivial question, but it's
> vexing to a relative newbie like me.  I'm just starting to learn Perl,
> and I've run into a problem chop'ping lines that are CR/LF terminated.

1) chop is strongly depreciated for this purpose. Use chomp instead.
(It removes \n (or the value of $/) but nothing else.)

2) Neither perl nor cygwin add newlines when reading files.

3) Text/binary mounts are a red herring.

4) comp.lang.perl.misc is a better place to ask perl questions.  (But
read the FAQ first!)

Jon


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019