#!/usr/bin/perl -w use strict; use WWW::Mechanize; my $response = ""; my $m = WWW::Mechanize->new(); $m->agent_alias('Linux Mozilla'); #$m->get('https://msp.f-secure.com/web-test/common/test.html'); $m->get('http://alumni.nd.edu/s/1210/start.aspx?sid=1210&gid=1&pgid=3&cid=40'); printf("%s\n", $m->title()); $m->dump_forms(); $response = $m->submit_form( form_number => 1, fields => { 'cid_40$txtUsername' => '', 'cid_40$txtPassword' => '', } ); die unless ($m->success); printf("response code is %s\n", $response->code); printf("response message is %s\n", $response->message); printf("response content is %s\n", $response->content); printf("response header time is %s\n", $response->header('date'));