in reply to array of arrays to hash
Produces:my $ranksUsed = [ [ 1 ], [ 2 ] ]; # No intermediate array or loop... my %ranksUsed = map {$_->[0] => undef} @$ranksUsed;
$VAR1 = { '1' => undef, '2' => undef };
"You're only given one little spark of madness. You mustn't lose it." - Robin Williams
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: array of arrays to hash
by AnomalousMonk (Archbishop) on Oct 06, 2014 at 18:02 UTC |