in reply to open file, write then read problem
open the file handler for reading the file after u close the fh for writing. In your script the file pointer is pointing to new line hence is not printing any data
open (FILE1_TEMP, "+>$file1_temp") or die "Could not open $file1_temp: $!";
print FILE1_TEMP "hello, world!";
close FILE1_TEMP;
open (READFILE1_TEMP, "$file1_temp") or die "Could not open $file1_temp: $!";
while (<READFILE1_TEMP>) { print $_; }
close READFILE1_TEMP;