in reply to Hashes: Find similar entries!

I don't know what exactly author wants,
maybe this?
to detect whether a number belongs to a pool of defined similarity
@a = qw/5 7 2 5 1 3/; undef @{$h{a}}{5, 4, 3}; undef @{$h{b}}{7, 9, 6}; undef @{$h{c}}{0, 2, 1}; for $x (@a){ exists $h{$_}{$x} and print "$x pool $_\n" for keys %h; }