remove

Synopsis

remove(@array, $scalar, ...)

Removes all of the specified values from the array.

remove(%hash, $scalar, ...)

Removes all of the specified values from the hash.

remove()

This version of &remove should only be used within a foreach loop. This form removes the current active element of the foreach loop.

Parameters

@array, %hash - the data structure to remove data from.

$scalar, ... - the value to remove. Scalar identity is used to determine scalar equivalence for this function. the identity algorithm compares references for object scalars and function scalars. The string representation is used to compare other scalars.

Side Effects / Notes

Examples

@array = @("a", "b", "c", "3", "blah", 3, 3.0); remove(@array, 3, "b"); println(@array);

@('a', 'c', 'blah', 3.0)

See Also