E
Emmanuel Touzery
Hello,
I was wondering.. IIRC, Perl came up with this "\n" in the end of
line in gets etc because in Perl, "" is false. So, if you want to have:
while (<>) {print $_;}
working, you needed that even empty lines won't be "false". So they
said that they will put the "\n" in the line, and problem is gone, nice
hack etc.
but in ruby, "" is true, so i'm wondering... why did ruby take this
over from perl? i find myself many times forgetting that chomp and the
fact ruby offers me the "raw" line format never ever helped me in any
way. is it just historical praise to Perl?
just curious,
emmanuel
I was wondering.. IIRC, Perl came up with this "\n" in the end of
line in gets etc because in Perl, "" is false. So, if you want to have:
while (<>) {print $_;}
working, you needed that even empty lines won't be "false". So they
said that they will put the "\n" in the line, and problem is gone, nice
hack etc.
but in ruby, "" is true, so i'm wondering... why did ruby take this
over from perl? i find myself many times forgetting that chomp and the
fact ruby offers me the "raw" line format never ever helped me in any
way. is it just historical praise to Perl?
just curious,
emmanuel