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