C'mon! Firstly, what you posted isn't HTML Code.

But far more significant, you merely assert that you tried to write the Perl to satisfy your spec... but don't show any code to support that claim. And then you start discussing array matching ... but, while we can infer arrays, you haven't shown any.

In short, your post falls short of the mark for lack of precision; the missing demonstration of effort; and the absence of code & associated verbatim errors messages, if any.

So, I'd suggest you take one step back and read On asking for help and How do I post a question effectively? (with special attention to the fact that this is not a factory churning out free code but rather, a venue to share wisdom and help newcomers to master Perl) and the regex section of Tutorials here. You almost certainly also have perldoc perlretut as a resource, right on your own computer. You'll also find that what I think is your question is answered repeatedly, here. Try hunting around the Q&A section (also available from the links just below the Monastery's bannder) and maybe follow up with a Google or Super Search for a triplet of terms like Perl array matching.

Then, come back with a fresh effort and any remaining questions (including the missing material above) and you'll likely get cheerful and expert advice.


In reply to Re: array matching by ww
in thread array matching by polsum

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.