A slight improvement over holli's in that you can access the entire i-1 previous elements.my $i = 0; foreach (@myarray) { # stuff goes here $i++; }
In reply to Re: Foreach Loops
by perlfan
in thread Foreach Loops
by hubb0r
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |