Perl INPUT_RECORD_SEPARATOR not matching default text file type?
David M. Karr
dkarr@tcsi.com
Fri Jan 5 16:29:00 GMT 2001
If my default text file type is "DOS", should the cygwin-built Perl
have the INPUT_RECORD_SEPARATOR variable ($/) be set to "\r\n"? It
appears to be set to "\n".
Alternatively, perhaps "chomp" should be able to strip either "\n" or
"\r\n"?
I'm finding that "chomp" on a line with a "newline" will leave it with
"^M" at the end.
I tried setting "$/" to "\r\n" and that made "chomp" behave as I
would like, but I would think I would not have had to do that.
--
===================================================================
David M. Karr ; w:(425)487-8312 ; TCSI & Best Consulting
dkarr@tcsi.com ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list