The problem is based around the fact that the
< > structure is used for globbing as well as
reading. Therefore anything other than a simple variable or
bareword, confuses perl. The solution (from memory) is to enclose the
contents in braces or (slightly clearer) use the underlying function
readline.
# $line = <$file_h{$temp1}>;
$line = < {$file_h{$temp1}} >;
$line = readline($file_h{$temp1});