From: 7stud -- Date: 2007-11-06T05:55:32+09:00 Subject: Re: fastercsv: row["header1"] syntax doesn't work, why? 7stud -- wrote: > $ cat data.csv > name number > me 12 > you 20 > > I've sifted through the docs, and I can't find any indication why the > row['name'] syntax won't work. Arrrgh. vim was turning my tabs into spaces, so the '\t' separator wasn't in the data.csv file. This works: $ cat data.csv name,number me,12 you,20 ------- FasterCSV.foreach("data.csv", :headers =>true) do |row| puts row puts row['name'] puts row['number'] puts row.class end --output:-- me,12 me 12 FasterCSV::Row you,20 you 20 -- Posted via http://www.ruby-forum.com/.