#!C:/perl/bin/perl.exe use LWP::UserAgent; use HTTP::Request::Common; my $url= 'http://punsez138451d/L3NOCALM/default.aspx'; my $ua = new LWP::UserAgent(keep_alive => 1); $ua->credentials('punsez138451d:80','',"INFLEVEL3\\Venkatesan_G02",'password'); $request = GET $url; print "--Performing request now...------------------\n"; $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"; } $contents = $response -> content(); #print "$contents\n"; open(FH,">C:/eonet.html"); print FH $contents; close FH; print $response->status_line(), "\n"; print $response->headers()->as_string(); #### C:\Documents and Settings\venkatesan_G02\Desktop>perl automate.pl --Performing request now...------------------ --Done with request--------------------------- It didn't work!->500 500 Internal Server Error Connection: close Date: Wed, 08 Apr 2009 18:55:22 GMT Server: Microsoft-IIS/6.0 Content-Length: 100 Content-Type: text/html Client-Date: Wed, 08 Apr 2009 18:55:23 GMT Client-Peer: 4.33.38.79:80 Client-Response-Num: 2 MicrosoftSharePointTeamServices: 12.0.0.4518 Title: Error X-Powered-By: ASP.NET