#!/usr/bin/env perl5.8.6 use strict; use warnings; use WWW::Mechanize; use WWW::Mechanize::FormFiller; my $mech = WWW::Mechanize->new(); my $formfiller = WWW::Mechanize::FormFiller->new(); ## Grab the home page, $mech->get("http://someurl"); my $msg= <success or die send_mail("Subject: xxxx Portal down", $msg_bos) , $mech->response->status_line; ## Store new HTML content in a temporary file and open it for viewing. open (OUT,">/tmp/login.results"); print OUT $mech->content(); close (OUT); exit(0);