map EXPR,LIST
$_
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.
@chars = map(chr, @nums);
translates a list of numbers to the corresponding characters. And
%hash = map { getkey($_) => $_ } @array;
is just a funny way to write
%hash = (); foreach $_ (@array) { $hash{getkey($_)} = $_; }