use WWW::Mechanize; use HTTP::Cookies; my $outfile = "out.htm"; my $url = "***************"; my $username = "**********"; my $password = "********"; my $mech = WWW::Mechanize->new(); my $number = 2; $mech->cookie_jar(HTTP::Cookies->new()); $mech->get($url); my @names = $mech->forms(); #print @names; #mech->form_id( $name ); $mech->form_name('login_form'); #$mech->form_number($number); $mech->field(USER => $username); $mech->field(PASSWORD => $password); $mech->submit(); my $output_page = $mech->content(); print $output_page; @links = $mech->find_all_links(); foreach (@links) { print $_->url(), "\n"; print $_->text(), "\n"; print $_->name(), "\n"; print $_->tag(), "\n"; } This gives:::