# instead of # my $TEMPfa; # create it in scope open (my $TEMPfa, ">", "temp"); #opens temp file #### use FileHandle; my $TEMPfa = FileHandle->new;