# build a hash that contains only excluded IDs my %exclude = map { ( $_->{id} => 1 ) } @AoH_one; # now keep only those that are not excluded: my @keepers = grep { not $exclude{ $_->{id} } } @AoH_all;