Assuming every value of %uni_refs is a unique index of @allrefs (which I judge to be quite likely), the following is a solution that scales better (O(N) instead of O(N log N)).
my %keep = map { $_ => 1 } values %uni_refs; my @refs = @allrefs[ grep $keep{$_}, 0..$#allrefs ];
In reply to Re: Code Interpretation
by ikegami
in thread Code Interpretation
by Perl_Ally
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |