From: Harry Ohlsen Date: 2004-05-06T20:20:57+09:00 Subject: Re: readlines Martin Uruz wrote: > now i use this dirty workaround but it works > arFile = readlines("tagedatei_uruz") > arLines = arFile[0].split("\n") Note that you're calling Kernel::readlines. It's one and only argument (if supplied) is the line separator. Since you're passing the file name, which presumably doesn't appear anywhere in the file's text, you get back an array containing one entry. As Gregory suggested, I think you actually want something like arLines = File.open("tagedatei_uruz").readlines Actually, I'm surprised you get what you expect at all. I assume you're running this via a command like ruby yourscript.rb < tagedatei_uruz which is why calling Kernel::readlines works. Hope that helps. Harry O.