All pastes #245101 Raw Edit

Mine

public ruby v1 · immutable
#245101 ·published 2006-11-10 16:44 UTC
rendered paste body
#!/usr/bin/ruby -wrequire 'CSV'old_table = CSV.open('file.csv','r')counter = 0new_table = Array.newold_table.each do |row|  # p row  rows = {          :field1     => row[0],                    :field2     => row[1],                    :field3     => row[2],                    :field4     => row[3], }  #counter += 1  #p counter  new_table << row[:field1], row[:field2], row[:field3], row[:field4]endputs "Out of the block now"puts new_table