Read File Into An Array

IO.readlines(file)

Regards,

Dan

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

···

-----Original Message-----
From: list-bounce@example.com
[mailto:list-bounce@example.com] On Behalf Of bc90141
Sent: Tuesday, May 23, 2006 8:28 AM
To: ruby-talk ML
Subject: Read File Into An Array

Hi,

I want to read a file into an array. I'm using the following code:

contentsArray = Array.new

f = File.open("filenamehere") or die "Unable to open file..."
contentsArray = filenamehere.each_line { |line| }

However, it seems to put the whole file into the array as one
item. If