my @sorted = map{ $_->[1] } sort { $b->[0] <=> $a->[0] } map{ [ $_->{size}, $_ ] } @{$aoh}; print Dumper \@sorted;