From: Xavier Noria Date: 2003-07-16T19:01:01+09:00 Subject: basic doubts on "\n" I am trying to get the picture about how "\n" works in Ruby. Since this is somewhat difficult to concrete in a single question I have broken the issue in a few ones. Let's see how it works. * Does "\n" play the role of logical newline? In a broad sense, if that was the case portable line-oriented code would use "\n" as newline for reading and writing through non-binmoded streams. (True in Perl, false in Java.) * Is "\n".length == 1 no matter the platfrom? (True in Perl, true in Java.) * Does "\n" == "\x0a" hold no matter the platform? (False in Perl, true in Java.) * Does "\n" get translated by the underlying I/O system back and forth to native newlines in non-binmoded streams? (True in Perl, false in Java.) Thank you very much, and regards from warm Barcelona, -- fxn