map

# given [1..5]

$array->map(sub{
    shift + 1
});

# [2,3,4,5,6]

The map method iterates over each element in the array, executing the code reference supplied in the argument, passing the routine the value at the current position in the loop and returning a new array reference containing the elements for which the argument returns a value or non-empty list. This method returns a Data::Object::Array object.

map(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