DB<1> @input=('a','b','c','d'); DB<2> %pos= map { $_=>$i++ } @input DB<3> print $pos{a} 0 DB<4> print $pos{d} 3
... so what if elements aren't unique?
Cheers Rolf
In reply to Re: Get Position of Element in an array
by LanX
in thread Get Position of Element in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |