my $mech = WWW::Mechanize->new; my $username = "user"; my $password = "pass"; my $host="somehost"; my $port="12001" $mech->credentials("$host:$port", "Tomcat Manager Application", "$username", "$password"); $mech->get("$url/manager/list"); print Dumper $mech->response; # print $mech->content();