I tried using WWW::Mechanize. Below is the code snippet. I might have picked it up from a previous post and tuned it to my need.
Am getting the error - Can't locate object method "redirects" via package "HTTP::Headers" at (eval 14) line 1.
Any idea how to overcome this error.
--------------------------
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use LWP::UserAgent;
my $UserName='username';
my $Password='pass';
my $mech = WWW::Mechanize->new();
my $res=$mech->get('https://we
die "Error getting login page\n" if $res->is_error;
$res=$mech->get("https://we
on=Submit");
die "Error logging in\n" if $res->is_error;
$res=$mech->get('https://we
die "Error getting page content\n" if $res->is_error;
open(my $out, "filename") or die "out: $!\n";
print $out $mech->content;
close($out);
Main Topics
Browse All Topics





by: nemws1Posted on 2009-09-15 at 08:38:42ID: 25336083
There are several. Have you looked at LWP::Simple or Web::Mechanize?