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