use warnings; use strict; use List::MoreUtils qw(firstidx); my @array = (2,4,7,5,8); printf "item with index %i in list is 7\n", firstidx { $_ == 7 } @arra +y; __END__ item with index 2 in list is 7
In reply to Re: Finding the index of a specific element in an array.
by toolic
in thread Finding the index of a specific element in an array.
by Thakur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |