This is the mail archive of the cygwin-apps@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]

Re: perl with automode


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


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