$ perl -E 'my @x = ("ade:Y", "Abc:X", "Afg:Z"); say for sort @x' Abc:X Afg:Z ade:Y $ perl -E 'my @x = ("ade:Y", "Abc:X", "Afg:Z"); say for sort { fc($a) cmp fc($b) } @x' Abc:X ade:Y Afg:Z #### $ perl -C -E 'my @x = ("\x{c5}de:Y", "Abc:X", "Afg:Z"); say for sort @x' Abc:X Afg:Z Åde:Y $ perl -MUnicode::Collate -C -E 'my @x = ("\x{c5}de:Y", "Abc:X", "Afg:Z"); say for Unicode::Collate->new->sort(@x)' Abc:X Åde:Y Afg:Z #### my @multi_sorts = ( [ $array1, ':', 'num' ], [ $array2, '-', 'alpha' ], [ $array3, ',', 'num' ], ); handle_multi_mixed_sorts(\@multi_sorts); # At this point in the code, each of the arrays in @multi_sorts # has the original array still as the first element # and the sorted array now as the fourth element. sub handle_multi_mixed_sorts { my ($multi_sorts) = @_; for my $i (0 .. $#$multi_sorts) { push @{$multi_sorts->[$i]}, [ sort { split_sort($a, $b, $multi_sorts->[$i][1], $multi_sorts->[$i][2]) } @{$multi_sorts->[$i][0]} ]; } return; }