delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <754324CDE8E4EE4498D8E0357D91368502EDFD@saab-bt.act.cmis.csiro.au> |
From: | "Walker, Gavin (CMIS, ANU - Acton)" <Gavin DOT Walker AT cmis DOT csiro DOT au> |
To: | "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com> |
Subject: | Re: Cygwin 1.3.2-1 Problems with CR/LF in Perl |
Date: | Thu, 23 Aug 2001 09:51:17 +1000 |
MIME-Version: | 1.0 |
X-Mailer: | Internet Mail Service (5.5.2653.19) |
Thanks Scott, Troy, Charles & Gerrit, binmode() would work for the particular example but gets more complicated when I want to insert my own lines. In binmode print F1 "hi\n"; would not insert CR/LF like it's supposed to. In my context the best solution is to remove all trailing CR/LFs using s/[\r\n]+$// or chomp; $tmp=$/; $/="\r"; chomp; $/=$tmp; or similar, and append my own "\n" when I need to. There's only a small risk that the CR/LFs are intentional. Thanks again, Gavin Walker Canberra, Australia -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |