Reading lists from a file in Ruby
Posted
by Gjorgji
on Stack Overflow
See other posts from Stack Overflow
or by Gjorgji
Published on 2010-03-22T07:43:13Z
Indexed on
2010/03/22
7:51 UTC
Read the original article
Hit count: 317
Hi,
I have a txt file which contains data in the following format:
X1 Y1
X2 Y2
etc..
I want to read the data from this file and create two lists in ruby (X containing X1, X2 and Y containing Y1, Y2). How can I do this in Ruby?
Thanks.
© Stack Overflow or respective owner