And of course you could also use grep to determine the index if you later would like to use it to remove elements with splice.
my @coin_idx = grep { $array[ $_ ] eq 'coin' } 0..$#array;
In reply to Re^2: Deleting Elements from an Array without their Index Number?
by Fletch
in thread Deleting Elements from an Array without their Index Number?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |