in reply to How to sort by the key value of an Array of Hash structure?
So you need to access the size key if you want to sort by it: @newarray = sort { $b->{size} <=> $a->{size} @array;
If you want to see your data structures, I recommend Data::Dumper.
|
|---|