Perl::Critic and Perl Best Practices book flag this loop as "C-style":
This is better:for ( my $i = 0; $i < @values; $i++ ) { $values[$i] = _clean_cgi_param( $values[$i] ); }
my @cleaned_values; for $value ( @values) { push @cleaned_values, _clean_cgi_param($value); }
Right ?
In reply to C-style for loop by mandog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |