my $username = "someuser";
my $password = "password";
my $url = 'http://sub.example.com:49282/navigation/nav_home.shtml';
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$req = HTTP::Request->new(GET => $url);
$req->authorization_basic($username,$password);
print $ua->request($req)->as_string;
####
## LWP!
use LWP;
use strict;
my $username = 'username';
my $password = 'password';
my $url = 'http://server:49282/subpage/nav_home.shtml';
my $browser = LWP::UserAgent->new('Mozilla');
$browser->credentials("server:49282","Digest realm",$username=>$password);
my $response=$browser->get($url);
print $response->content();
####
## WWW::Mechanize
#!/usr/bin/perl
use WWW::Mechanize;
my $username = 'username';
my $password = 'password';
my $url = 'http://server:49282/subpage/nav_home.shtml';
# Create a new instance of WWW::Mechanize
my $mechanize = WWW::Mechanize->new(autocheck => 1);
# Supply the necessary credentials
$mechanize->credentials("server:49282","Digest realm", $username=>$password);
$mechanize->get($url);
# Retrieve the desired page
print $mechanize->content();