From: Geoff Date: 2006-03-16T08:48:46+09:00 Subject: Re: csv nil check and update Ok, obiously I'm doing something wrong again. I am new to both programming and to Ruby, so please excuse the low brow questions! I've now got this because I really want to take the result and output to a new file, but it does not work: require 'CSV' last = "" newFile = File.open("C:\\temp\\geoff\\filldown\\filldownNew.txt", "w+") CSV.foreach("C:\\temp\\geoff\\filldown\\filldown.txt") do |row| if row[-1].empty? row[-1] = last else last = row[-1] end newFile << (p row) end Ideas? Thanks! Geoff