in reply to Foreach Loops
You can have a counter:
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 Section
Seekers of Perl Wisdom