delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/06/16:11:24

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
From: "Christopher Rath" <christopher AT rath DOT ca>
To: "Cygwin Maillist" <cygwin AT cygwin DOT com>
Subject: Perl, text files, & \r
Date: Fri, 6 Jul 2001 16:11:07 -0400
Message-ID: <PAEBIDDBILOFFDPNDLKNMENGCDAA.christopher@rath.ca>
MIME-Version: 1.0
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019