Omukawa has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I'm working on script in which I have to sort some words according to the international phonetic alphabet and not ASCII. So I tried to use Sort:ArbBiLex, in which one can define the sorting order. The problem is: It doesn't work. The question is: Can you tell me what's wrong in the definition? The code is below:
use Sort::ArbBiLex ( 'puma_sort'=> "ʌ Ʌ a A b B c C d D ɖ Ɖ e E f F g G h H i I j J k K l L m M n N ŋ Ŋ o O p P r R s S t T ʈ Ʈ u U v V w W y Y z Z" ); @foo = puma_sort(@foo);
PS: The chracters that don't look right are unicode characters. I don't know why they're not displayed right here but normally there OK, so they're not the problem in the code.
Thanks a lot!

Replies are listed 'Best First'.
Re: Sort:ArbBiLex problem
by moritz (Cardinal) on Sep 09, 2008 at 15:57 UTC
    The problem is: It doesn't work.

    That's not very specific. In what way doesn't it work? Does it throw an error? Or does it run, but generate wrong results?

    The chracters that don't look right are unicode characters.

    That's a known problem here :(, not your fault.

      Sorry, I wasn't very clear. With "it doesn't work" I meant it doesn' sort anything. The script works perfect but the words don't get sorted at all.
        So it doesn't even sort ASCII characters correctly?

        If it does sort ASCII correctly, but not the rest, it could be that your input data is not in the same encoding as the script itself, and thus they don't match your non-ASCII-characters in your script.

Re: Sort:ArbBiLex problem
by massa (Hermit) on Sep 09, 2008 at 16:54 UTC
    UPDATE: I am crazy. Please ignore me.
    []s, HTH, Massa (κς,πμ,πλ)
      I had that common suspicion asserting $self and generalizing the result. You may safely ignore me, too.