From: "Ara.T.Howard" Date: 2005-11-08T06:22:11+09:00 Subject: Re: from text file to array in shortest way On Tue, 8 Nov 2005, ngoc wrote: > books_array = Array.new() > File.open('books_file.txt').each { |line| > books_array.push(line) > } > > Are there other ways shorter than above ? > For example: books_array = File.open('books_file.txt').to_array() a = IO::read 'books_file.txt' -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | anything that contradicts experience and logic should be abandoned. | -- h.h. the 14th dalai lama ===============================================================================