From: Karl Gabel Date: 2007-03-16T01:31:08+09:00 Subject: Re: A little advice on writing a logWriter Alexander Jonsson schrieb: > Hello everyone, > > I'm new to Ruby and not so experienced programmer in overall but i > manage to do "ok". Now I started to program a bit in Ruby and wanted > to write a logWriter program but the problem is that Ruby doesnt have > I/O Stream functions like java and C++. > log_fd = File.new("test_log", "w+") or just open an existing one log_fd.write(str) or log_fd << "str" log_fd.flush you can also use sprintf log_fd.write(sprintf "%d", var) log_fd.close have a look to http://www.ruby-doc.org/core/classes/IO.html is this you are looking for? regards karl