open(my $fh, '<', $file) or die "error opening '$file': $!";
to the equivalent:
open(my $fh, '<', $file) || die "error opening '$file': $!";
while always using && and || inside logical expressions, for example preferring:
if ($x > 5 || $y < 10) ...
to the equivalent:
if ($x > 5 or $y < 10) ...
When this style is followed consistently, I find the code easier to read and
understand at a glance.
See also Perl Best Practices,
Chapter 4, "Values and Expressions", "Don't mix high- and low-precedence booleans" item.
|