Next | ![]() ![]() |
33 |
The last part untouched is:
53 next if ($file =~ /^\./); 54 next if !($file =~ (/[0-9]/)); 55 next if !($file =~ (/txt/));
Let's Avoid Excess Punctuation
Beginning programmers like to put in excess parentheses
This is because they are afraid of precedence effects
Don't be Superstitious applies here
The inner parentheses are pure superstition
perl -MO=Deparse is a useful tool for curing precedence superstitions:
perl -MO=Deparse -e 'next if !($file =~ (/txt/));'
# Output: next if not $file =~ /txt/;
Next | ![]() |
Copyright © 2002 M. J. Dominus |