Ok, I need to parse webpages (that I wrote, but has been modified by others), and extract pertinent information stored within <div> </div> tags of class 'listing'. I'll list a sample entry below and then detail what I wish to parse out of it, with the format of another sample. Hopefully this will make sense and I'll gladly accept any advise as to which modules to use to make this easier.
<div class="listing"> Agave parryi&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal;">Parry's agave</span> <br>$20.00&nbsp; 3 quart&nbsp;&nbsp;&nbsp; $12.00 Quart <br><span id="native">Native</span>&nbsp;&nbsp;&nbsp; Sun to part shade&nbsp; Zones 5-10&nbsp; Family: <i>Amaryllidaceae</i> <br>From the Southwest comes this lovely agave.&nbsp; Thick spiny leaves adorn this hardy agave.&nbsp; Ultimate clump size is about 36" with each leaf being maybe 5" across. The flower stalk can reach 12 feet tall. Please plant in well drained soil in a place where children don't play. <span id="hummingbird">Hummingbirds</span> </div>
Ok, what I'd like to get out of this (and there's a lot more html junk around it to ignore) is:
Latin name (ie agave parryi)
Common name (Parry's agave)
Pot price ($20.00)
Pot size (3 quart)
Pot price ($12.00)
Pot size (quart)
Origin: Native
Exposure: Sun to part shade
Hardiness: 5-10
Family: Amaryllidacea
Text description:From the Southwest comes this lovely agave.  Thick spiny leaves adorn this hardy agave.  Ultimate clump size is about 36" with each leaf being maybe 5" across. The flower stalk can reach 12 feet tall. Please plant in well drained soil in a place where children don't play.
Special Features: Hummingbirds (there's others of those...but I can handle generalization (I think))
Ok, sorry for such a long post...but I wanted to give a good thorough example.

In reply to HTML Parsing (ick) by dbarron

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.