What is [a] way to read file and fail on any erorrs?
If you don't need fancy error messages, how about autodie? It's lexical, so it can be used in the narrowest possible scope, globally, etc. E.g. (untested):
my $filename = '...'; ... my $whole_nine_yards = do { use autodie; open my $fh, '<', $filename; local $/; <$fh>; };
Give a man a fish: <%-{-{-{-<
In reply to Re: bullet proof SLURP file
by AnomalousMonk
in thread bullet proof SLURP file
by leszekdubiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |