grep

# given {1..4}

$hash->grep(fun ($value) {
    $value >= 3
});

# {3=>5}

The grep method iterates over each key/value pair in the hash, executing the code reference supplied in the argument, passing the routine the key and value at the current position in the loop and returning a new hash reference containing the elements for which the argument evaluated true. This method returns a Data::Object::Hash object.

grep(CodeRef $arg1, Any $arg2) : ArrayObject

method

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 10:

Unknown directive: =name

Around line 14:

Unknown directive: =usage

Around line 24:

Unknown directive: =description

Around line 32:

Unknown directive: =signature

Around line 36:

Unknown directive: =type