From: Martin Uruz Date: 2004-05-06T20:03:55+09:00 Subject: Re: readlines Gregory Millam wrote: > Received: Thu, 6 May 2004 19:28:56 +0900 > And lo, Martin wrote: > > >>hi >>i use the following syntax to read a file with 7 lines in a array >>but only the first element contains all lines >>i tryed to add a delimiter as 2. argument but it doesnt work? >>code: >> >> >>arFile = readlines("datname") >>2. try >>delimiter = "\n" >>arFile = readlines("datname", delimiter) >>this produces an error > > > readlines() reads from STDIN until EOF. If you want to read from a file, you'll want: > > IO.readlines("datname") > > now i use this dirty workaround but it works arFile = readlines("tagedatei_uruz") arLines = arFile[0].split("\n") -- thx martin pfeffer at suse 9.0 Apache 2.0 http://eurowalker.is.dreaming.org