Help for this page

Select Code to Download


  1. or download this
    use LWP::UserAgent;
    my $ua = new LWP::UserAgent('keep_alive' => '1');
    ...
    $ua->credentials('intranet:80', '', "domain\\user", 'pass');
    my $response =$ua->get($url);
    print $response->code();
    
  2. or download this
    use WWW::Mechanize;
    my $mech = WWW::Mechanize->new('keep_alive' => 1);
    ...
    $mech->credentials('intranet:80', '', "domain\\user", 'pass');
    $mech->get( 'http://intranet/mypage' );
    print $mech->status();