Skip to content

Instantly share code, notes, and snippets.

@andrewtimberlake
Created April 5, 2009 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewtimberlake/90389 to your computer and use it in GitHub Desktop.
Save andrewtimberlake/90389 to your computer and use it in GitHub Desktop.
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