keys
keys %hash
- Returns a list consisting of all the keys of the named hash. The keys are returned in an apparently random order, but it is the same order that either the
valuesoreachfunction produces (assuming that the hash has not been modified between calls).In scalar context,
keysreturns the number of elements of the hash (and resets theeachiterator).keyscan be used as an lvalue to increase the number of hash buckets allocated for the hash:keys %hash = 200;