while () { eval { open my $fh, "<", $file or CORE::die "Couldn't open '$file': $!"; }; print STDERR "ERROR: $@" if $@; }