in reply to Replace and substitur in same file


Open the source file, checking for success.

Open a destination file, checking for success.

Read source file line by line, make substitutions, write to destination file.

Close files for neatness ( OCD, I can't help myself ).

Check for success everywhere you can.

Start EVERY program with strictures. For at least the next 5 years.