in reply to Re: Hopefully a simple mistake
in thread Hopefully a simple mistake

I wasn't using -w (I feel silly)

Being an initiate I made a rooky mistake. :-)
The error was closing the file one level too early in the curly braces.
I was writing to a closed file. I still don't know how the file was being changed, but there are other logic errors. I'll find them now.

Thank you all for your suggestions and help.

Your humble servant,
-Chuck