This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Perl, text files, & \r
- To: "Cygwin Maillist" <cygwin at cygwin dot com>
- Subject: Perl, text files, & \r
- From: "Christopher Rath" <christopher at rath dot ca>
- Date: Fri, 6 Jul 2001 16:11:07 -0400
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@rath.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/