If you have code that purports to sort text that looks like this: @sorted_lines = sort @lines; Then all you have to get a dictionary sort is write instead: use Unicode::Collate; @sorted_lines = Unicode::Collate::->new->sort(@lines);