Presuming elements of @a1 are unique . . .
my %a1_indexen; @a1_index{ @a1 } = 0..$#a1; my @indexen = map $a1_index{ $_ }, @a2;
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Scanning a list for indices
by Fletch
in thread Scanning a list for indices
by cmv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |