Hello wise monks, I'm trying to parse several html pages but their format is different in that the info that I want is after three different class tags. I can find one tag and get the data I want just fine the problem is with the multiple tags. I can return values related to anyone but not all three which is what I want. I tried to use the "each" and "match" in mojo with no luck. I also tried looking for a null string value so I wouldn't be overwriting the mapping if I had already found what I needed after matching one tag and extracting the values. Anyway here's the code that I though could work:
$r2 = $dom2->find( '[class="LC20lb DKV0Md"]' or '[class="BNeawe vvjw +Jb AP7Wnd"]' or '[class="CVA68e qXLe6d"]' ) -> map( sub{ $_->text } ) +;
Any ideas on how to pull out the data I need behind the 3 tags and map so I can write should be greatly appreciated. Thanks, Newbmyer

In reply to Mojo::DOM help by Anonymous Monk

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.