in reply to Re^4: Creating new character classes for foreign languages
in thread Creating new character classes for foreign languages

Regarding the thing that didn't work, did you leave something out from the code that you posted? The "non-working" definition for "InThaiLCons" makes a reference to a sub called "Thai::InThaiCons", but there is no such subroutine in the code you posted. Clearly, referring to a non-existent subroutine will lead to failure.

Based on what you've posted, it looks like you can simply define your three subsets of consonants explicitly (including your definition of "InThaiLCons" that does work), and then create an overall "InThaiCons" sub by adding together the three subsets:

sub InThaiCons { return <<END; +Thai::InThaiHcons +Thai::InThaiMCons +Thai::InThaiLCons END }

Replies are listed 'Best First'.
Re^6: Creating new character classes for foreign languages
by Polyglot (Chaplain) on May 17, 2009 at 16:14 UTC
    Graff,

    You have sure been patient with me. Thank you. I did have another subroutine called InThaiCons which I had forgotten to show (naming all Thai consonants: 0E01 - 0E2E). However, your thought led me to scrutinize that part once again, and I discovered the error.

    s/InThaiHcons/InThaiHCons/

    Ouch...what a dull head can't do to obstruct progress, a slow finger can. I wonder how often I am delayed hours over a single character like this?

    Thank you again!

    Blessings,

    ~Polyglot~