Trap 4 - a solution 

$hash{key} = open_file($filename);
my $fh = $hash{key}
while(<$fh>) {
  print;
}