An update:

I've installed all the suggested modules, tried multiple ways to get around this, and I still haven't gotten it to work. It just won't accept the authentication, and takes me to a "username/password wrong" page instead of the next page. To add to the confusion, with my authentication steps, I can go to any page on the website through get($url), but I can't use a form or go to a new page through a link. Once I try, even get($url) stops working. Here's a quick update/simpler version to my code (just looking for a link now instead of a form):

#!usr/bin/perl use strict; use warnings; # left some comments to show what I've tried #require LWP::UserAgent; #require HTTP::Request::Common; #require HTTP::Response; #use Crypt::SSLeay; #use IO::Socket::SSL; #use CGI::Form; #use HTML::Form; use WWW::Mechanize; use MIME::Base64; my $username = 'name'; my $password = 'password'; my $website = "https://www.url.com/"; my @args = ( Authorization => "Basic " . MIME::Base64::encode( $username . ':' . $password )); my $mech = WWW::Mechanize->new( ); $mech->credentials( 'www.url.come','Automated Analyses', $username, $p +assword ); # enabling cookies use HTTP::Cookies; $mech->cookie_jar(HTTP::Cookies->new()); my $url = "https://www.url.com/"; $mech -> get ($url); # getting links my @links = @{$mech->links}; # the 'enter' link on the front page $mech->follow_link(n=> 5); # and this prints the "401 error" page print "\n\n", $mech->content, "\n";

In reply to Re: HTTPS WWW::Mechanize Form Problems by LE500
in thread HTTPS WWW::Mechanize Form Problems by LE500

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.