Hi All,
There are times when I want to know th4e index of an array
when I am in a "for @array" loop. I can do it with a
variable outside the for loop and increment it, but
I would line to know know if there is a way to incorporate
it in the loop command.
This is my long winded way of doing it in Perl 5:
while (my ($Index, $Element) = each ( @Sorted_List ) ) { do something }
Many thanks,
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~