go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I gave you a reason for preferring the Perl style for loop in general - fewer parts to go wrong. Eliminating a variable is not generally the important difference between two different for loop usages. Indeed:
Is generally a much better solution than:
because the range of the Perl loop is much easier to see and harder to get wrong. In general we can say what sort of for loop is better - Perl for loops. '"C-style" is bad because of useless $i variable' is not the reason however. Perl reduces RSI - it saves typing In reply to Re^4: C-style for loop
by GrandFather
|
|