Hi Tim,

why don't you simply use save or write? You don't need to open a port (fp),
just use:

foreach txt insert_txt [
  write/append/lines %some-file.txt txt
]          

and you're done.

insert always inserts at the head of a series, that's why your getting the
stuff in reverse. If for some reason you prefer using a port, then use
insert tail like this:

foreach txt insert_txt [
  insert tail fp txt 
]          

You can also use append instead of "insert tail".

If you want a newline, this works as well:

foreach txt insert_txt [
  insert tail fp txt 
  insert tail fp newline
]          

or

foreach txt insert_txt [
  insert tail fp join txt [newline]
]          

Don't forget to update fp before you close it:

update fp
close fp

Hope this helps,



;- Elan >> [: - )]

Reply via email to