I have a sequential file and I would like to edit it. I will do this by reading it all into an array, edit it, and write it all back. When I do that, the new edited text writes perfectly... but it doesn't remove the OLD text!!!!

How can I remove ALL the text inside the text file and re write it?

thankyou