Welcome to the Monastery | |
PerlMonks |
Re: playing with mapby Anonymous Monk |
on Mar 09, 2001 at 23:16 UTC ( [id://63315]=note: print w/replies, xml ) | Need Help?? |
I have written lots and lots of Perl code without ever
really using the map command very much. But I often see
it in other's code. So, my impression is that the code
@new = map { act_on($_); } @old; is functionally equivalent to for (0..$#old) { $new[$_] = act_on( $old[$_] ); } Is this a correct view of things? CJW
In Section
Seekers of Perl Wisdom
|
|