in reply to Re: Read value from file, replace, then write to new file
in thread Read value from file, replace, then write to new file

the "open (MYFILE" line is missing the '<' you need to indicate read access
This may be considered poor style, but it's not exactly a bug. '<' is optional.
  • Comment on Re^2: Read value from file, replace, then write to new file