The keys keyword[edit | edit source]
The keys command returns all the keys the HASH has in an apparent random order, when called in list context. In Perl 5.12.0 or later, the indices of an ARRAY are returned.
As a side effect, keys resets the internal iterator of the ARRAY or HASH (see each). Calling it in void context resets the iterator with no other overhead.
Syntax[edit | edit source]
keys HASH keys ARRAY keys EXPRESSION