my $mech = WWW::Mechanize->new(); my @args = (Authorization => "Basic " .MIME::Base64::encode('USER:PASS+')); $mech->get('http://mylink/', @args); $mech->get('http://mylink/'); $mech->credentials($username,$password);