From: Damjan Rems Date: 2007-10-30T21:06:13+09:00 Subject: Re: Is there a better way to do this? (write something to a file Chris Richards wrote: > Is there a better way to write text to a file? > > File.open("/file/location/new.txt","w") {|file| file.write "data to > write"} > > It just seems a bit long winded and unmessy You can always write like: file = File.open("/file/location/new.txt","w") file.write "data to write" file.close But there is no ruby fun there. by TheR -- Posted via http://www.ruby-forum.com/.