From: Thomas Preymesser Date: 2011-02-19T06:02:40+09:00 Subject: Re: How to read CSV in Ruby 1.9.2 --0016e650a4f283b58a049c94d51a Content-Type: text/plain; charset=ISO-8859-1 On 17 February 2011 10:35, Catsquotl wrote: > I wondered that myself last week and came up with.. > > this code is not really a good solution > @a = [] > f = File.open("#{filename}", "r") > this could be much simpler written as File.open(filename,"r") > f.readlines.each {|e| > e.chomp! > b=e.split(";") #or comma's if you prefer. > with this line you get rather false results if you have a string value in a csv file which contains ',' oder ';'. -- Thomas Preymesser thopre@gmail.com http://thopre.googlepages.com/ http://thopre.wordpress.com/ --0016e650a4f283b58a049c94d51a--