>> Is there a better way to write text to a file?
> You can always write like:

Or you can make this way:

File.open("test.txt","w") {|file| file << "data to write"}

-- 
Eust?quio "TaQ" Rangel
http://eustaquiorangel.com

"There is no reason for any individual to have a computer in his home."
Ken Olsen