Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
To: Jason Tiller <jtiller@sjm.com>
Cc: <cygwin@cygwin.com>
Subject: Re: 'chop' and text mounts
References: <Pine.WNT.4.32.0103081659110.-294355@tiller2.ventritex.com>
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.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
Content-Type: text/plain; charset=us-ascii

Jason Tiller <jtiller@sjm.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

