I’d like to write to a text file, skipping the first line, but otherwise writing over everything else. I have an array that I’m reading from the file into, and using it to store and manipulate data if the data in the text file needs to be corrected, then I want to immediately write back the data. the original text file has two columns, tab delimited, plus a single line at top that I want to keep.
Thanks,
Amanda
You could try this:
You now have an array with only the content – not the header line. So modify this to your heart’s content.
Then, to preserve the header line, do this to write it back:
Does that work for you?