Gurus,
perldoc -f map says,
---------------------------------------------------------------------------------------------------------------------
map BLOCK LIST
map EXPR,LIST
Evaluates the BLOCK or EXPR for each element of LIST
(locally setting `$_' to each element) and returns the
list value composed of the results of each such
evaluation. Evaluates BLOCK or EXPR in a list context,
so each element of LIST may produce zero, one, or more
elements in the returned value.
---------------------------------------------------------------------------------------------------------------------
Evaluates BLOCK or EXPR in a list context,
so each element of LIST may produce zero, one, or more
elements in the returned value.
How is this different from the "return from subroutine" mechanism? There
the return value is the last expression evaluated ( assuming no explicit
returns ). Do these 'subroutine blocks' and 'map blocks' have same
semantics? I read and reread the docs but somehow missing the link, if any
between the two.
---------- Thanks
Atul