my @sorted = sort { uc($a) cmp uc($b) || $a cmp $b } @unsorted;