in reply to Javascript in Perl and retrieving the HTML source.

The HTTP server is giving you the raw page before Javascript is processed. This is because the web browser has to process it. If you changed your web browser settings to turn off Javascript, you would have the same problem as you are having with the Perl program.

What you need to do is process the Javascript commands in your Perl program, just like the web browser does. Check out Javascript for a Perl module that does that.