graff,

Your answer was excellent, and I thank you. It was just what I needed to get me started. I did some reading at the site that JavaFan also recommended and it was good too. I need to absorb more of it, I think, but that will come in time.

I have two questions now, that I have run into a need for, which I do not see addressed anywhere. The first is a very simple question.

1) Is it permissible to comment somehow within the subroutine's character set block? For example:

sub InThaiVowel { return <<'END'; 0E30 0E45 0E4D 0E22 #Thai consonant yo-yak can also be a vowel (like 'y' in English) 0E2D #Thai consonant or-ang can also be a vowel 0E27 #Thai consonant wo-wen is only a vowel following mai han-akat END }

2) Is it possible to define a double-character property? For example, the Thai 'r' becomes a vowel if, and only if, there are two of them together, as in 'rr'. It is then pronounced differently, and is no longer strictly an 'r'. How might I handle this? I suppose this would require some look-ahead assertions...but could these be incorporated into the subroutine in some way?

Thank you so much for your helpfulness!

Blessings,

~Polyglot~


In reply to Re^2: Creating new character classes for foreign languages by Polyglot
in thread Creating new character classes for foreign languages by Polyglot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.