Need help for the error "301 moved permanently"!

bipin Nayak <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
Thanks for adding me to this group.

Following is the script and result I am getting:-



use WWW::Mechanize;

my $url='https://www.platts.com/Login.aspx?';

my $mechanize = WWW::Mechanize->new(autocheck => 1);

$mechanize->cookie_jar(HTTP::Cookies->new);

$mechanize->agent('Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1)
Gecko/20061010 (IKDhPmJcdw) Firefox/2.0');

my $response = $mechanize->get( $url );

my $html = $mechanize->content;

print "$html  \n";



Output of script is:-



<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>301 Moved Permanently</title>

</head><body>

<h1>Moved Permanently</h1>

<p>The document has moved <a
href="http://www.platts.com?<http://www.platts.com/?>
">here</a>.</p>

</body></html>



It should get source page of https://www.platts.com/Login.aspx?, But it is
saying error “301 moved permanently”.



Can anyone help me please on this regard, I tried a lot but not able to fix
this issue?



Thanks in advance!



Thanks & Regards,

Bipin Nayak* (Bipin)*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.