... for sort { $uniq{$a} cmp $uniq{$b} } keys %uniq;