sub login{
print "Logging in to Yahoo...";
#set url to page requiring login and password
my $url = 'http://login.yahoo.com/config/login?.done=http://fantasysports.yahoo.com&.src=spt&.intl=us';
$mech->get( $url ) or die("Could not get $url\n");
#these two fields were specfic to the Yahoo login HTML field names
#for login and password.
$mech->field("login", 'my_username');
$mech->field("passwd", 'my_password');
$mech->click();
print "Done.\n";
}#sub login
####
$mech->set_visible( "my_username", "my_password");
##
##
sub login{
print "Logging in to Yahoo...";
#set url to page requiring login and password
my $url = 'http://login.yahoo.com/config/login?.done=http://fantasysports.yahoo.com&.src=spt&.intl=us';
$mech->get( $url ) or die("Could not get $url\n");
#these two fields were specfic to the Yahoo login HTML field names
#for login and password.
$mech->set_visible( "my_username", "my_password");
$mech->click();
print "Done.\n";
}#sub login
##
##
$mech->submit();
##
##
my $button = $mech->current_form()->find_input(undef, "submit");
$mech->click_button(input => $button)