require 'csv'file_str = File.open("data.csv").readrec = []; pos=nil; i=-1c,pos = CSV::parseLine(file_str, pos.to_i, rec[(i+=1)]=[]) until pos == 0