my %clean = %$hashref1; delete @clean{qw( key1 key2 )}; eq_hash( \%clean, $hashref2, 'partial hash comparison' );