@sorted = sort { unless ($a->{'name'} cmp $b->{'name'}) { $a->{age} <=> $b->{age} } } @data;