in reply to Re: Get AoH values into array
in thread Get AoH values into array
So doesn't map still solve the problem by using a loop? And wouldn't all the inefficiencies of using a loop directly be carried over by using map?%hash = map { getkey($_) => $_ } @array; is just a funny way to write %hash = (); foreach $_ (@array) { $hash{getkey($_)} = $_; }
Honest questions, I'm genuinely curious.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Get AoH values into array
by FunkyMonk (Bishop) on Sep 06, 2007 at 18:39 UTC |