#!/usr/bin/perl -w use LWP::UserAgent; use HTTP::Request::Common; use LWP::Debug qw(+); use Authen::NTLM; use strict; use warnings; my $url = 'http://mywebserver.com/Path/Path2/MyFile.htm'; # Set up the ntlm client and then the base64 encoded ntlm handshake message my $ua = LWP::UserAgent->new(keep_alive=>1); my $host = 'mywebserver.com:80'; my $uname = 'mydom\User1'; my $psswd = 'test1234'; $ua->credentials("$host", '', "$uname", "$psswd"); my $request = GET $url; print "--Performing request now...-----------\n"; my $response = $ua->request($request); print "--Done with request-------------------\n"; if ($response->is_success) {print "It worked!->" . $response->code . "\n";} else {print "It didn't work!->" . $response->code . "\n"}