output should be : comparing %hash1 with %hash 2 : found 1 match which is D comparing %hash1 with %hash 3 : found 1 match which is D comparing %hash2 with %hash 3 : found 1 match which is D and J my %hash1 = ( A => 1, B => 2, C => 3, D => 4, ); my %hash2 = ( D=>1 E =>2, F => 3, G => 4, H => 5, I => 6, J=>7 ); my %hash3 = ( J=>1 K =>2, L => 3, M => 4, N => 5, O => 6, P=>7 Q =>8, R =>9, S =>10, T => 11, U =>12, D=>13, );