in reply to Accessing HTML var using Perl

When you say you need to read a variable from a web page, do you mean from a form someone filled out? Simply use the param in CGI.

Or do you mean that you need to parse the text of some external page to get that value? Then you need to fetch that page with eithe LWP::Simple, LWP::UserAgent, or even WWW::Mechanize with HTML::Parser.

For matters dealing with focus, you need to either use Javascript (for things that will run on arbitrary client machines), or, if the script will be working with local windows, Win32::OLE.