in reply to Confused about LWP, Mechanize and UserAgent
Hi,
You can't do that with LWP::Simple.
See http://search.cpan.org/~gaas/libwww-perl-5.805/lwptut.pod#HTTP_Authentication
for a tutorial.
Hope this helpsuse strict; use LWP; my $browser = LWP::UserAgent->new; $browser->credentials( 'www.mydomain.com:80', # Look up this realm with your browser, eg. Firefox 'web_server_usage_reports', 'user_plinky' => 'Password_banjo123' ); my $url = 'http://www.mydomain.com/program.cgi?var1=apples&var2=bananas'; my $response = $browser->get($url); #......
In Section
Seekers of Perl Wisdom