Search results for "module:Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops"
Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops - Write for(0..20) instead of for($i=0; $i<=20; $i++).
The 3-part "for" loop that Perl inherits from C is butt-ugly, and only really necessary if you need irregular counting. The very Perlish ".." operator is much more elegant and readable. for($i=0; $i<=$max; $i++){ #ick! do_something($i); } for(0..$max...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC