Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3EE4DBB8.612DDA8D@arrayinc.com> Date: Mon, 09 Jun 2003 15:10:48 -0400 From: Don Slutz X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Updated: Perl 5.8.0-3 breaks binmode() Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This update breaks the usage of binmode(FH). I am sure that: > News: Changes: - Moved Cygwin to the non DOSish platforms. is the main reason. Last time I was in the perl sources, I saw that perl only expected two types of file opens; text or binary. However cygwin supports 3: default, text, and binary. I would expect that declaring cygwin to be like VOS (text open is different then binary open; but do not change end of line handling) would be the fix. I have also found that | some times does things to end of lines also. Here is output of some tests that I ran to validate this issue (tests are available via direct e-mail): test/txt/idos test/txt/odos-binmode differ: char 3, line 1 test/txt/idos 0000000 1 cr nl 2 cr nl 0000006 test/txt/odos-binmode 0000000 1 cr cr nl 2 cr cr nl 0000010 Which is the output from: #! /usr/bin/perl -w $line = 0; open(I,"<$ARGV[0]"); binmode(I); open(O,">$ARGV[1]"); binmode(O); while() { $line++; print O; } close (I); close (O); # print "Lines: $line\n"; -Don Slutz -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/