in reply to map {} list or do {} for list?

Or with a slice:

delete @hosts{ grep { $hosts{$_} != $table_count } keys %hosts };