Created
April 5, 2009 06:25
-
-
Save andrewtimberlake/90389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
col1 = [] | |
col2 = [] | |
col3 = [] | |
col4 = [] | |
col5 = [] | |
File.open("C:\\Documents and Settings\\Desktop\\test.txt", "r") do |infile| | |
while(line = infile.gets) | |
numbers = line.split(/\s*,\s*/) | |
col1 << numbers[0].to_i | |
col2 << numbers[1].to_i | |
col3 << numbers[2].to_i | |
col4 << numbers[3].to_i | |
col5 << numbers[4].to_i | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment