Hi ikegami (Cardinal) and all Monks,

I finally got the code to work. Thanks for your valuable suggestions.

But i have a new problem now that i cannot acces web pages ending with .aspx extn instead of .html or .com extns.
I have given my code below:
#!C:/perl/bin/perl.exe use LWP::UserAgent; use HTTP::Request::Common; my $url= 'http://goweb.corp.global.level3.com/sites/ti_nm/tni/default. +aspx'; my $ua = new LWP::UserAgent(keep_alive => 1); $ua->credentials('goweb.corp.global.level3.com/sites/ti_nm/tni/default +.aspx:80','',"LEVEL3\\username",'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();
I am pasting my result as well for your reference
--Performing request now...------------------ --Done with request--------------------------- It didn't work!->401 401 Unauthorized Date: Wed, 08 Apr 2009 18:02:59 GMT Server: Microsoft-IIS/6.0 WWW-Authenticate: NTLM Content-Length: 1656 Content-Type: text/html Content-Type: text/html; charset=Windows-1252 Client-Date: Wed, 08 Apr 2009 18:02:59 GMT Client-Peer: 10.1.158.205:80 Client-Response-Num: 1 MicrosoftSharePointTeamServices: 6.0.2.5530 Title: You are not authorized to view this page X-Powered-By: ASP.NET
Please review this and provide your comments!!! Thanks in advance

In reply to Re^8: WWW::Mechanize Problem by Anonymous Monk
in thread WWW::Mechanize Problem by venkatesan_G02

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.