#!usr/bin/perl use WWW::Mechanize; use WWW::Mechanize::FormFiller; my $mech = WWW::Mechanize->new() my $formfiller = WWW::Mechanize::FormFiller->new(); my $username = "user_name"; my $password = "password"; my $url = "http://www.myurl.com/default.aspx"; # Grab the home page, and click the login button to redirect to the correct page(HTML listed below). $mech->get($url); $mech->click_button(number => 1); # Set the username and password fields accordingly and submit. $mech->set_visible( $username, [password => $password] ) ; $mech->submit(); # Store new HTML content in a temporary file and open it for viewing. $html = $mech->content(); open (OUT,">tmp.html"); print OUT $html; close (OUT); system("tmp.html"); #### Login
Authorized users, please enter your trading user ID and password:
Please enter your user ID:

Please enter your password: