go ahead... be a heretic | |
PerlMonks |
Re: Find last position of an element in arrayby johngg (Canon) |
on Mar 28, 2022 at 21:32 UTC ( [id://11142471]=note: print w/replies, xml ) | Need Help?? |
You could build a hash, keyed by @array items with the value being array position, via a map that, in effect, keeps overwriting the position of each item until the last one is reached.
I hope this is helpful. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|