use strict; use warnings; # The hashes my %hash1 = (1..6); my %hash2 = (1..4, 7..10); my %hash3 = (1, 2, 9..12); # Build the list of hash references my @hashList = (\%hash1, \%hash2, \%hash3); my %keyCount; # Count the keys map {$keyCount{$_}++} keys %$_ for @hashList; # Find duplicates my @common = sort grep {$keyCount{$_} == @hashList} keys %keyCount; print "@common";