#!/usr/bin/perl -w use strict; use WWW::Mechanize; use HTML::TokeParser; my $login = "xxxxxxxxxx"; my $password = "xxxxxxx"; my $url = "http://login.yahoo.com/config/login?"; my $mech = WWW::Mechanize->new(); $mech->get($url); $mech->form(); $mech->field("login","$login"); $mech->field("passwd","$password"); $mech->submit(); if ($mech->find_link( text => "Sign Out")){ print "Success!\n" } else{ print "Fail\n"; } my $test = HTML::TokeParser->new(\$mech->{content}); my $text = $test->get_text; print "$text";