From: James Edward Gray II Date: 2007-07-17T12:09:30+09:00 Subject: Re: Newbie: fastcsv: Read rows, print rows On Jul 16, 2007, at 5:53 PM, drub wrote: > >> >> Just be aware about the fact that row is changed after row.each > > Thanks for the warning! > > There must be a fastercsv feature to get rid of the encapsulating ' > characters (e.g. the single quote). > > FasterCSV.open(infile, "r") do |row| > > row.each do |field| > field.each do |field| > print "|" > print "#{field}" > > > end > puts "|" > end > end > > The output: > |'field 1'|'field 2'|'field 3'| > > I want: > |field 1|field 2|field 3| The single quote character is not part of the CSV specification, so they are not removed. I'm afraid you will need to pluck those out by hand. James Edward Gray II