in reply to How to sort by the key value of an Array of Hash structure?
Stolen from this Q&A node, you can do a Schwartzian Transformation by doing:
my @sorted = map{ $_->[1] } sort { $b->[0] <=> $a->[0] } map{ [ $_->{size}, $_ ] } @{$aoh}; print Dumper \@sorted;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to sort by the key value of an Array of Hash structure?
by kyle (Abbot) on Jul 30, 2008 at 17:56 UTC |