On 17 February 2011 10:35, Catsquotl <catsquotl / gmail.com> 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/