in reply to Script using WWW::Mechanize fails to log in

Hi!
I executed your code *as is* without changes, and I believe that you first must use strict; and then you will find out that you cannot
my $agent->cookie_jar(HTTP::Cookies->new);
if you have not initialized user agent like:
my $agent = LWP::UserAgent->new;
I hope it's a good start for you. Cheers!

Replies are listed 'Best First'.
Re^2: Script using WWW::Mechanize fails to log in
by Anonymous Monk on Jun 08, 2006 at 07:56 UTC
    I initialized the agent variable, but it still doesn't work. I was just playing around and wondering whether cookies were the reason that it wasn't working and accidentally posted it to perlmonks. Anything else that you see that might cause it not to work? Do i have to use cookiejar?
      A reply falls below the community's threshold of quality. You may see it by logging in.
      You need cookies for later authentication, after you succesfully log in. Also, I believe that you must initialize cookies in WWW::Mechanize object.
        Dear Arkturuz, Thank you -- I'd like to try that. Why doesn't WWW::Mechanize mention that? Any good links on this that I can look up or examples I can copy? I need to get this program working for my boss before I go into labor and yesterday was my due date!