in reply to Language::MySort

Does this improve on the POSIX locale system? I can see that it would for Klingon, but for most purposes it seems simpler to (adapted from perllocale):

use POSIX qw( locale_h ); my $oldloc = setlocale( LC_COLLATE, 'fr-CA.ISO8859-1') or warn 'Locale missing', $!; use locale; # go on to sort things
That approach makes available all the locale knowlege that the C libs have.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Language::MySort
by DrHyde (Prior) on May 27, 2003 at 13:25 UTC
    Whilst he described it in terms of sorting an arbitrary alphabet, it's not limited to alphabets. What if you want to combine the normal English sort order with a custom sort-order for punctuation characters? Such as ignoring the $ and @ signs, so that $_ and @_ get sorted together rather than having a bunch of crap in between.