my @newarray = grep { hcmp( \%goodhash, $_ ) } @somebadhashes;