From: Robert Klemme Date: 2006-05-24T00:43:42+09:00 Subject: Re: Read File Into An Array 2006/5/23, bc90141 : > Tim Becker wrote: > > > contentsArray=[] # start with an empty array > > f.each_line {|line| > > contentArray.push line > > } > > > > That should do it. > > -tim > > That did it - thanks! :-) Why do you settly with a complicated version? IO.readlines() will perfectly suit your needs. If you want to do it while iterating yourself you should at least use the block form of File.open(). File.open your_file do |f| f.each_line ... end Kind regards robert -- Have a look: http://www.flickr.com/photos/fussel-foto/