www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/08/26/16:37:28

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Date: Sun, 26 Aug 2001 16:37:19 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-apps AT cygwin DOT com
Subject: Re: perl with automode
Message-ID: <20010826163719.A4221@redhat.com>
Reply-To: cygwin-apps AT cygwin DOT com
Mail-Followup-To: cygwin-apps AT cygwin DOT com
References: <3B897925 DOT 15198 DOT 12B5ECFC AT localhost>
Mime-Version: 1.0
In-Reply-To: <3B897925.15198.12B5ECFC@localhost>
User-Agent: Mutt/1.3.21i

On Sun, Aug 26, 2001 at 10:33:09PM +0200, Gerrit P. Haase wrote:
>Charles wrote:
>>Maybe Chris' chomp() suggestion is the right thing.
>
>However, i built a perl with automode linked in.  I think
>this chomp() problem, if there is one, is an additional one,
>say a second bug.  But i've never heard of a chomp() bug;)

Huh?  It's not a chomp bug.  Please go back and read what I wrote.

>The first is, i want perl to write back to files like i read
>them in, textmode, binmode, textmount, binmount, that should
>make no difference if i try to read in a file in memory,
>close it and write back to another file, there should be no
>additional CR or LF all the time (as it happens if i am on a
>text mount).
>For doing this, i don't want to use chomp().
>
>Please get a copy and try if it works, i've tested not that
>much, so this is an EXPERIMENTAL release.

If you are linking with automode, it can't possibly work correctly
with binary files unless you use binmode() on the files.  I don't
need to verify this.  automode() is not a magic bullet.  It just
causes files to be open in textmode for reading by default and
binary mode for writing by default.

cgf

- Raw text -


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