Most of those
use statements are unnecessary, as LWP will
generally pull in any modules that it needs.
If you are using
LWP::UserAgent then you certainly
WWW::Mechanize, and by
default LWP will create an in-memory
The problem is most likely that the HTML that you are fetching from the
retrieved. LWP won't emulate that for you, so the page remains just as it
was sent from the web site.
There is no good solution to this, but
WWW::Mechanize::Firefox allows you to drive
an installed Firefox browser from Perl code, and will do what you need.