Another option is a kind of Kobayashi Maru scenario, where you can change the contraints of the underlying problem in order to derive a simpler solution.

Instead of messing with LWP, HTTP, and parsing HTML to get at the data, just get the data itself. I know you said you want to do it that way however, as an exercise; which is cool, so feel free to ignore the rest of what I'm about to say.

IMDb.com provides all of their data as well as alternative interfaces to their data. One of the interfaces is a suite of unix command line utilities useful for querying the data, which sounds exactly like you need. IMDb probably also appreciates the alternatives being used instead of screen scrapers.

In reply to Re: Extracting content from html by Withigo
in thread Extracting content from html by sdslrn123

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.