I know Perl has regex built in, but I am looking to see if there exists a module for doing state machines for pattern matching of a simplier nature (eg pretty much only supporting arbitraries like '0 or more', 'exactly 1'). I'm specifically looking to do this on a list as opposed to a string, in other words, trying to pattern match a list for a given series of elements. I know that I could 'cheat', and join the list into a string, and glorp off the regex engine to match with that, but I don't want to limit what I do to just string elements in the list at the moment (How other element types would be behave in pattern matching, I've yet to figure that out). CPAN has no obvious modules for this. Not that a state machine isn't hard to develop, but I'd rather not reinvent the wheel.
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

In reply to State machine module? by Masem

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.