See Re: How to extract text present in 3 lines within the HTML tags as an example for how to use the XML::Twig module to parse HTML input. This isn't the only perl module you could use, but let's stick to it for now. That answer also shows how to extract text inside a HTML element once you've found the element.
Now you just need one more piece to solve your problem. You have to find the right element, which isn't just any div element, but the div element with the particular id attribute. For that, look at the documentation of the XML::Twig module for a method of XML::Twig that returns an element of a particular id. If you can't find it, look at the hint under the fold.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.