From: "NAKAMURA, Hiroshi" Date: 2003-01-23T19:43:33+09:00 Subject: Re: Feature request: Array.to_h (2nd part!) Hi, Gavin, > From: "Gavin Sinclair" > Sent: Friday, January 17, 2003 9:03 PM > Isn't there a CSV processing library available? I imagine an API > would provide hash-like access: > > data = CSV.new(filename) > data.each do |record| > # access record[:year], etc. > end There is a csv processing module here: http://www.ruby-lang.org/raa/list.rhtml?name=csv But it doesn't do anything special treatment about "the first line as column header." You must write like below now. require 'csv' year = 5 CSV.open(filename, "r") do |record| p record[year] end Regards, // NaHi