Copyright © tutorialspoint.com
Syntax
Definition and UsageEvaluates EXPR or BLOCK for each element of LIST. For each iteration, $_ holds the value of the current element, which can also be assigned to allow the value of the element to be updated. Simply, Perl's map() function runs an expression on each element of an array, and returns a new array with the results. Return Value
ExampleTry out following example:
It will produce following results:
|
Copyright © tutorialspoint.com