Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Mark Allan Young" To: Subject: Perl: Textmode vs. Binary mode... Date: Tue, 20 Mar 2001 23:29:10 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 if I open a open a file using the perl command: unless(open(CONFIG, "<$config")) { print("Error: Can't open fglg file, \"$config\".\n"); exit(-1); } on a file system mounted with textmode: Device Directory Type Flags C:\cygwin\bin /usr/bin system textmode C:\cygwin\lib /usr/lib system textmode C:\cygwin / system textmode should I expect the line read with perl command: while($line = ) { to be terminated with a "\r\n" or just a "\n". I assumed that I would get a "\n", but for some reason, after updating my cygwin today on one of my systems to 1.1.8, I started getting "\r\n". I used to use a single "chop($line)" to get rid of the newline then process the remaining string as a filename...but now I have that nagging "\r" at the end of the string screwing everything up... what part of this equation am I missing... ...myoung -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple