in reply to Appending and empty files

See File Handles or File::Temp or use lexical filehandles.
# instead of # my $TEMPfa; # create it in scope open (my $TEMPfa, ">", "temp"); #opens temp file
it looks like you are running into a glitch by declaring $TEMPfa a global scalar at the start of the script. It should at least be classified a filehandle
use FileHandle; my $TEMPfa = FileHandle->new;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Appending and empty files
by Jeri (Scribe) on Sep 20, 2011 at 18:45 UTC
    Thanks zentara, I will def fix that. Jeri