in reply to Converting a HoH to an AoA
I still don't really understand [map]
It took me some time to really get my mind around map the first several dozen times I encountered it, myself.
One thing that finally helped me to begin to feel more comfortable with it was to realize that map is simply an "inside-out" version of foreach.
So you can switch between the following:
foreach ( LIST ) { DO_SOMETHING_WITH-$_ }
... and ...
map { DO_SOMETHING_WITH-$_ } LIST;
Maybe that will help you as much as it helped me :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting a HoH to an AoA
by wfsp (Abbot) on Jan 19, 2007 at 20:24 UTC |