in reply to How to compare hash value

Well.. assuming you mean this:
%myhash = ( key1 => [abd, bcd, cde, def, efg], key2 => [abd, def], key3 => [efg, cde, tgh], key6 => [cde, tgh, efg], );
You could loop through all the keys of %myhash, sort the value array and compare it to all other elements.

This would scale to n(n-1) which is roughly n2 so it's very slow.