[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Log file

Sam C.

1/27/2007 2:31:00 AM

How do I log the user inputs from my program to a text file? I've looked
on the web for this, and I can't find it...

Thanks!

--
Posted via http://www.ruby-....

1 Answer

Erik Veenstra

1/27/2007 4:48:00 PM

0

Something like this?

File.open("user_output.txt", "w") do |f|
while line = gets
f.puts line
end
end

(Sorry, couldn't resist... ;])

gegroet,
Erik V. - http://www.erikve...