View Problem

Append to a file

DiskEdit
ruby
file = File.new('/tmp/test.txt', 'a+') ; file.puts 'This line appended to file!!' ; file.close()
DiskEdit
csharp .Net 2.0 or later
System.IO.File.AppendAllText("filename.txt", "Some text to append to the file");
ExpandDiskEdit
erlang
Line = "This line appended to file!\n",
{ok, IODevice} = file:open("test.txt", [append]), file:write(IODevice, Line), file:close(IODevice).
ExpandDiskEdit
fantom
File(`out.txt`).out(true).writeChars("some text").flush

Submit a new solution for ruby, csharp, erlang, or fantom
There are 13 other solutions in additional languages (clojure, cpp, fsharp, groovy ...)