in reply to Common hash keys
$hasInt will be undef unless there's an intersection.use strict; use vars qw($hashRef1 $hashRef2); #code that puts values into the hashes my @keyIntersection = grep exists($hashRef2->{$_}), keys %$hashRef1; # Or if you just want to know if there are any use List::Util; my $hasInt = first {exists $hashRef2->{$_}} keys %$hashRef1;
But be careful, it will be 0 if the first interecting key is '0'
throop
In Section
Seekers of Perl Wisdom