in reply to Overwriting temp file

Your scopes are fine. But this:

open ($TEMPfa,"<",  'temp');

should be this:

open ($TEMPfa,">",  'temp');

That is, you are opening a file for reading, not writing.

Replies are listed 'Best First'.
Re^2: Overwriting temp file
by Jeri (Scribe) on Sep 21, 2011 at 18:45 UTC
    Thanks! I updated it on the post. It runs, but it doesn't overwrite. I'm going to keep working on it.