# Warning, untested. # Given @players as above, my @sorted= sort { $a->atts->{vob} <=> $b->atts->{vob} || $b->first_child_text($field) <=> $a->first_child_text($field) } @players;