You're none too clear about what you're trying to accomplish. The keys of a hash are all unique. You can check existence of keys from an array with grep over a slice,
That gives you another HoA containing only the elements of the original which match other internal keys than their own.my %found_keys; for my $key (keys %hoa) { $found_keys{$key} = [grep { exists $hoa{$_} and $_ ne $key } @{$hoa{$key}}]; }
I'm not positive that's what you want, but I hope it helps.
After Compline,
Zaxo
In reply to Re: manipulating a hash of arrays
by Zaxo
in thread manipulating a hash of arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |