>>>>> "K" == Kontra, Gergely <kgergely / mlabdial.hit.bme.hu> writes:

K> On the other hand chomp is safe, but it cannot handle unknown style
K> line-endings. Do you know a smart solution?

 wait for 1.8 ?

pigeon% /usr/bin/ruby -ve 'p "abc\r\n".chomp'
ruby 1.6.7 (2002-03-01) [i686-linux]
"abc\r"
pigeon% 

pigeon% ./ruby -ve 'p "abc\r\n".chomp'
ruby 1.7.2 (2002-04-26) [i686-linux]
"abc"
pigeon% 



Guy Decoux