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
In reply to Re: Sorting array of hash references
by davido
in thread Sorting array of hash references
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |