open my $FILE1_TEMP, '+>', $file1_temp or die "Could not open $file1_temp: $!";