From: "Learnatwoa learn@..." Date: 2006-12-07T19:35:47+09:00 Subject: Re: #help in reading from csv file Here how you can access correctly a csv file. This works and is more in the ruby style. require 'csv' CSV::Reader.parse(File.open('my.csv', 'rb')) do |row| next if row.first.nil? #skip blank lines create_product(row) end But you can be more restrictive by changing the condition on the next by: next unless row.size == 5 #skip all lines without the exact number of columns (5 here) I hope this will help you, ++ jerome () { c = Woa! Kft w = http://www.woa.hu } -- Posted via http://www.ruby-forum.com/.