in reply to Re: Map: Thou Has't Confounded Me For The Last Time! (Referring To The Array You Are Assigning To In Map)
in thread Map: Thou Has't Confounded Me For The Last Time! (Referring To The Array You Are Assigning To In Map)
This is the beginning of the road to understanding the difference between a list and an array, by the way. You'll see both terms in the perldocs, but you won't see a lot to explain the difference. An array is a variable type. A list is what an array contains, but lists often exist without any array at all. The @anon_temp in ikegami's example is one way of explaining such a list.
Note that foreach is a statement type, while map is an operator. This operator takes one list, and transforms it into a completely new list, element by element.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Map: Thou Has't Confounded Me For The Last Time! (Referring To The Array You Are Assigning To In Map)
by Anonymous Monk on Feb 15, 2005 at 01:29 UTC |