Yet another daft question from Elgon,

I am rewriting my Texas Hold'ems Tool as an object oriented module and I'm trying to increase the fluency of the code. Thanks to kschwab, John M. Dlugosz, ignatz and others for help so far. The problem I am currently working on is how to reduce out one of the patterns which matches to the list of values of the cards. At the moment I have:

# Now for unsuited straights (not too difficult... if ( $sorted_values eq 'abcde' or $sorted_values eq 'bcdef' or $sorted_values eq 'cdefg' or $sorted_values eq 'defgh' or $sorted_values eq 'efghi' or $sorted_values eq 'fghij' or $sorted_values eq 'ghijk' or $sorted_values eq 'hijkl' or $sorted_values eq 'ijklm') { # do stuff... }
but what I'd really like to say is something like...
if ($sorted_values =~ m/INSERT_PATTERN_HERE/) { # Do stuff... }

I've tried reading the Chapter on regexps and pattern matching in the Blue Camel but I'm not really making any progress. In essence I'm trying to match all combinations of characters where they form a contiguous sequence (I have thought about doing this using the return values from ord() but decided that this would be inelegant.)

Can anyone give me some pointers please?

Elgon

"Rule #17 of Travel: Never try and score dope off Hassidic Jews while under the impression that they are Rastafarians."
       - Pete McCarthy, McCarthy's Bar


In reply to Pattern Matching Query by Elgon

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.