P is for Practical | |
PerlMonks |
Re: remove current element out arrayby comatose (Monk) |
on May 19, 2000 at 19:28 UTC ( [id://13249]=note: print w/replies, xml ) | Need Help?? |
If you want to know the current element in a foreach loop, you could easily switch to a for loop. In this case $i is your array index.
Here's something else you could do. As always, there's more than one way to do it.
If you have a really big array, you will want to use references.
In Section
Seekers of Perl Wisdom
|
|