perl sorting an array of hashes
- by srk
use strict;
my @arr;
$arr[0][0]{5} = 16;
$arr[0][1]{6} = 11;
$arr[0][2]{7} = 25;
$arr[0][3]{8} = 31;
$arr[0][4]{9} = 16;
$arr[0][5]{10} = 17;
sort the array based on hash values so this should change to
$arr[0][0]{6} = 11;
$arr[0][1]{9} = 16;
$arr[0][2]{5} = 16;
$arr[0][3]{10} = 17;
$arr[0][4]{7} = 25;
$arr[0][5]{8} = 31;
first sort on values in the hash.. when the values are same reverse sort based on keys...
Please tell me how to do this..
Thank you