Chapter 21. Array and Hash Functions
- defined expr†
Not specifically an array or hash function, but provides a convenient way to test whether an array or hash element has a defined value.
- delete lku
,. . .
,. . .
lku must be an array lookup like
], or a hash key lookup like
}. Deletes the specified elements from the array or hash. Returns aliases to the deleted values. Deleting the last element(s) of an array will shorten the array.
- each %hash
In list context, returns a two-element list consisting of the key and an alias to the value for the next element of the hash. In scalar context, returns only the key. Entries are returned in an apparently random order. After all values of the hash have been returned, an empty list is returned. The next call to each after that will start iterating again. A call to keys or values will reset the iteration.
- exists lku
lku must be an array a hash lookup (see delete above). Checks whether the specified array element or hash key exists.
- grep expr, list
- grep block list
Evaluates expr or block for each element of the list, locally aliasing
$_to the element. In list context, returns the list of elements from list for which expr or block returned true. In scalar context, returns the number of such elements.
- join expr
Returns the string formed by inserting expr between all elements of list and concatenating the result.
- keys %hash
In list context, returns a list ...