But then, I'd still prefer the for(0 .. $#bar) form proposed further down the thread.for (my $count = 0; $count < @bar; $count++) { print "$count -> $bar[$count]\n"; }
Makeshifts last the longest.
In reply to Re^2: foreach count variable
by Aristotle
in thread foreach count variable
by dreamy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |