From: Ludo Date: 2002-12-06T20:19:27+09:00 Subject: Re: \n if I understand what you want, maybe this could help you: f.readlines[0].chomp! -KhiGia- On Fri, 06 Dec 2002 12:13:26 +0100, Basti S wrote: > Hi there, > i have a little problem. I want to read out lines of a file. But every time > ruby reads it out, there is always this \n at the end of the line. Does > anybody know how to get rid of this character? > > Example: > > f=File.open("123") > f.readlines[0] > > for example returns the first line: 12345\n > > If you don't know what I mean, feel free to write me. I don't know how to > express it correctly... > > Thanks