in reply to Accessing HTML var using Perl

what do you mean by HTML variable?
probably it can be done with client side PerlScript, but i doubt you mean that.
to "communicate" from a HTML page to a server side perl script (via CGI) one usually uses HTML forms with fields or via a link. please elaborate what you want to do.
seeing if a page has finished loading is also only possible with client side scripting.
update:: or have a look at the CGI section in Tutorials, e.g. Setting up Perl/CGI with Windows