You can install Array::Each::Override and override each. This will allow you to obtain both the index and the value of each array element.
• another intruder with the mooring in the heart of the Perl
In reply to Re: array looping with foreach (try Array::Each::Override)
by grinder
in thread array looping with foreach
by bst_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |