in reply to Sorting array of hash references
Like this:
my @sorted = sort { $a->{score} <=> $b->{score} or $a->{name} cmp $b->{name} } @unsorted;
I employed logical short circuiting to allow the comparison routine to compare names if two equal scores are encountered.
Dave
|
|---|