It can be hard to focus on things when you've been through a lot of emotional events, so you might just need a little more time before you climb back on. But if you feel like you're really ready, here's as good a job as I can do to make the exercise even more clear.

The exercise is dealing with regular expressions (which the book is calling patterns), which are a kind of string-description language.

The Perl operator for applying a regular expression to a string to see if it matches, is the "match operator", m//. The m is optional (and generally omitted) if slashes are used. The regular expression goes between the slashes. To see if $_ matches $pattern, we just do /$pattern/.

To see if the pattern in $what appears somewhere in $_ three times in a row, we can do /$what$what$what/, or /($what){3}/ for short.


We're not really tightening our belts, it just feels that way because we're getting fatter.

In reply to Re: Fell off the Llama by Roy Johnson
in thread Fell off the Llama by bluethundr

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.