my @indexes = grep { $a[$_] eq $search_for } 0..$#a; $participants{$og} = \@indexes;
This puts an array reference of all found indexes into the hash. See perlreftut for more information about references, and why you need them here.
In reply to Re: Getting indices of the same value that occurs multiple times in an array...
by moritz
in thread Getting indices of the same value that occurs multiple times in an array...
by reubs85
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |