The problem with my above code (if I am not wrong) is that
1) I have used two modules - WWW::Mechanize and HTTP::Request.
2) I have set the cookie with the HTTP::Request module and downloaded the web page by the Mechanize object.
It is for this reason that my downloaded page was showing "Your session has expired."

I have made some changes to my program but still the problem persists.(session expired)
The complete changed program is as below.
#!/usr/bin/perl # Stats.plx use warnings; use strict; use WWW::Mechanize; use File::Basename; use DBI; use Date::Manip; use Template::Extract; use Data::Dumper; my $agent; $agent = WWW::Mechanize->new( autocheck => 1 ); $agent->get("http://www.abc.com/ChooseZone.aspx?type=A"); print "Making HTTP Post Request....\n"; $agent->get("http://www.abc.com/ChooseZone.aspx?type=A &__EVENTTARGET= +rdlZone_0 &__EVENTARGUMENT= &__VIEWSTATE='dDw0NzUyOTE0NzQ7dDw7bDxpPDE ++Oz47bDx0PDtsPGk8MT47aTwzPjs+O2w8dDw7bDxpPDA+Oz47bDx0PDtsPGk8MD47Pjts +PHQ8O2w8aTwwPjtpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8cDxwPGw8VGV4dDs+O2w8U +GxlYXNlIFNlbGVjdCB0aGUgQ29uc3VsYXIgRGlzdHJpY3QgdGhhdCBjb3ZlcnMgeW91ci +BSZXNpZGVuY2U7Pj47Pjs7Pjs+Pjt0PDtsPGk8MT47PjtsPHQ8cDxwPGw8VGV4dDs+O2w +8VFQgU2VydmljZXMgLSBXZWIgQXBwbGljYXRpb247Pj47Pjs7Pjs+Pjs+Pjs+Pjs+Pjt0 +PHQ8O3A8bDxpPDA+O2k8MT47aTwyPjs+O2w8cDxcPC90ZFw+XDx0ZCB3aWR0aD0nMjUlJ +2NsYXNzPSdCb2R5VGV4dCdcPlw8Ylw+VVMgQ29uc3VsYXRlIENoZW5uYWkgKE1hZHJhcy +lcPC9iXD5cPC90ZFw+XDx0ZCBjbGFzcz0nQm9keVRleHQnXD4gQ292ZXJzIHJlc2lkZW5 +0cyBvZiB0aGUgc291dGhlcm4gc3RhdGVzIG9mIEFuZGhyYSBQcmFkZXNoLCBLZXJhbGEs +IFRhbWlsIE5hZHUsIEthcm5hdGFrYSwgTGFrc2hhZHdlZXAgSXNsYW5kcyBhbmQgUG9uZ +GljaGVycnkuXDwvdGRcPlw8dGRcPjsxPjtwPFw8L3RkXD5cPFREIHdpZHRoPScyNSUnY2 +xhc3M9J0JvZHlUZXh0J1w+XDxiXD5VUyBFbWJhc3N5IE5ldyBEZWxoaVw8L2JcPlw8L1R +EXD5cPFREIGNsYXNzPSdCb2R5VGV4dCdcPiBDb3ZlcnMgcmVzaWRlbnRzIG9mIERlbGhp +IGFuZCB0aGUgbm9ydGggSW5kaWFuIHN0YXRlcyBvZiBIYXJ5YW5hLCBIaW1hY2hhbCBQc +mFkZXNoLCBKYW1tdSAmIEthc2htaXIsIFB1bmphYiwgUmFqYXN0aGFuLCBVdHRhciBQcm +FkZXNoIGFuZCBVdHRhcmFuY2hhbC5cPC9URFw+XDxURFw+OzI+O3A8XDwvVERcPlw8VEQ +gd2lkdGg9JzI1JSdjbGFzcz0nQm9keVRleHQnXD5cPGJcPlVTIENvbnN1bGF0ZSBDYWxj +dXR0YSAoS29sa2F0YSlcPC9iXD5cPC9URFw+XDxURCBjbGFzcz0nQm9keVRleHQnXD4gQ +292ZXJzIHJlc2lkZW50cyBvZiBBc3NhbSwgTWFuaXB1ciwgTWVnaGFsYXlhLCBOYWdhbG +FuZCwgVHJpcHVyYSwgQmloYXIsIE9yaXNzYSwgV2VzdCBCZW5nYWwsIEFydW5hY2hhbCB +QcmFkZXNoLCBTaWtraW0sIE1pem9yYW0sIEpoYXJraGFuZCwgQW5kYW1hbiBhbmQgTmlj +b2JhciBJc2xhbmRzIFw8L1REXD5cPFREXD47Mz47Pj47Pjs7Pjs+Pjs+Pjs+ES4L3Lspg +y7Nq0zptOk6nJmcTfM=' &rdlZone = 1"); $agent->get("http://www.abc.com/CalendarDisp.aspx",":content_file" => +"cal.html" );
Please suggest, esteemed monks!!

In reply to Re: Error! Clone on unblessed reference by Agyeya
in thread Error! Clone on unblessed reference by Agyeya

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.