From: peteV Date: 2013-04-30T03:19:28+09:00 Subject: writing lines to a file I have a text file with on every line a magic card number and such info eg: 072 GTC U Mental Vapors I'm trying to read the file line for line and append each line to a file named foozled.txt. I wrote a method to_s it prints to screen right with output : 072 |GTC| U | Mental Vapors but I need this output to append this to the foozled file. how can this be done? it now prints nil on each line in the foozled file ------------> snipped code File.open(cardList,"r") do |file| file.each_line {|line| line.length parse=Card.new("#{line}","#{line}","#{line}","#{line}") File.open('foozled.txt','a') do |line| line.puts parse.to_s #appends only nil to the file but prints to screen end } end