On Tue, Jan 11, 2011 at 4:57 AM, Sean Murphy <[email protected]> wrote:
> Hi all.
>
> I have read the explaination of the Map function and it is still a mystry to
> myself on what it is for and when would you use it?
>
> All explainations I have seen in books and blogs don't make it clear.
>
my @new = map {$_} @arr;
is the same as:
foreach (@arr) {
push $_, @new;
}
in other words, do something to every element of an array.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/