Re: File output
- Posted by Patrick Barnes <mrtrick at gmail.com> Nov 29, 2004
- 448 views
You need to use append mode. Update mode allows you to open a file for reading and writing, the position starts at the beginning of the file. Append is for adding to an existing file (write only). The position starts at the end of the file. Try: fn = open(file,"a") puts(fn,"blah") On Sun, 28 Nov 2004 17:18:49 -0800, Jacen <guest at rapideuphoria.com> wrote: > > posted by: Jacen <pip at mail.sylvancomputers.com> > > How do I output to a file without overwriting it? I used > open(file,"u")--update > puts(fn,"blah") > and it overwrites what is already in the file > > > > -- MrTrick