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: "Christopher Rath" To: "Cygwin Maillist" Subject: Perl, text files, & \r Date: Fri, 6 Jul 2001 16:11:07 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit 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 V6.00.2462.0000 The mailing list archives have some discussion surrounding $/ and trouble people have had parsing files properly. My problem is similar by involves output. Using cygwin’s perl (v5.6.1p1), I haven’t been able to find any method of forcing simply while(<>){do-something;print($_);} loops of working “properly”. By properly I mean not changing the record separator. What happens is this: the input records do not contain any \r characters, only \n, and they are parsed correctly. After the records have been _processed_ by my script, they are written out by perl is appending a \r character to the end of every line. Can someone help me out? I’ve tried forcing $\ to “\n”, but that didn’t help. Cheers, Christopher =========== Christopher Rath == (613) 824-4584 =========== 1371 Major Rd., Orleans, ON, Canada K1E 1H3 =============== mailto:christopher AT rath DOT ca =============== ``Hydrogen is a colourless, odourless gas which, given enough time, turns into people.’’ --- Henry Hiebert ================== http://www.rath.ca/ =================== -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/