foreach $key (%hash) { if ($key{Value} le $variable) && (($key{Value1} eq 'String') && ($key{value2} eq 'String1')) { Do this.... }