# Pastebin aLFGTObb f = File.open('myfile.txt', 'a') CSV.foreach('tld.csv', headers: true).with_index do |row, idx| f.puts "#{Whois.whois(row[idx]).created_on}" end f.close