@fks = grep not( $_->table_to->name eq $orig_fk->table_from->name and $col->eq([$orig_fk->columns_from], [$_->columns_to]) ), @fks; # OR @fks = grep not $_->table_to->name eq $orig_fk->table_from->name && $col->eq([$orig_fk->columns_from], [$_->columns_to]), @fks;