Trap 1 - some solutions
Use a lower precedence 'or' operator:
open my $fh, '<', $filename or die "open($filename): $!";