From: ChrisH Date: 2006-03-16T06:23:46+09:00 Subject: Re: csv nil check and update You have an answer, but since I spent some time on it, here's mine! 9^) require 'csv' csvData = CSV.readlines("d:\\ruby\\dev\\filldown-csv\\filldown.txt") puts 'Before:' csvData.each {|l| p l} 1.upto(csvData.size - 1){ |i| 0.upto(csvData[i].size - 1){|j| csvData[i][j] ||= csvData[i-1][j] } } puts 'After:' csvData.each {|l| p l} For some reason my CSV wouldn't read the data when it has quotes around the values... cheers Chris