What's wrong with how you are doing it? Making a one liner of it will only make it shorter -- not necessarily better:
my %hash; $hash{$_->[0]} = $_ for @$array_ref; #or my %hash = map{$_->[0] => $_} @$array_ref;
In reply to Re: optimizing code - need help
by danger
in thread optimizing code - need help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |