From: "R.. Kumar 1.9.1 OSX" Date: 2010-08-23T15:06:25+09:00 Subject: Re: stripping whitespace while reading CSV Fearless Fool wrote: > I'm perplexed over what ought to be a simple CSV question: can you ask > CSV to strip whitespace from individual cells as it reads? The > following works, but is it the approved idiom? > > CSV.parse(s).each {|row| row.each {|col| col.strip!}} > > - ff I can't recall why I stopped using CSV, so I am not the best person to answer, but it looks okay. You can use CSV.foreach also. To see options, on the command line you can do: ri CSV::new -- Posted via http://www.ruby-forum.com/.