Perl, text files, & \r
Christopher Rath
christopher@rath.ca
Fri Jul 6 13:11:00 GMT 2001
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/
More information about the Cygwin
mailing list