in reply to Re: Script fails to insert text and appends it towards the end of file.
in thread Script fails to insert text and appends it towards the end of file.

Dear haukex

Thanks a lot for the wonderful explanation. Adding recsep=>"\n" has solved my problem and this is enough, in the first pass (as I know the line numbers to insert the text, beforehand). However, eventually I intent to use the state machine pattern, or to overwrite the file in each iteration. Thank you for the pointers and for thinking way ahead of me! always_coys.
  • Comment on Re^2: Script fails to insert text and appends it towards the end of file.
  • Download Code