use strict; use File::Basename; use Getopt::Long; use WWW::Mechanize; use URI qw( ); my $thisScript = basename($0); print "==START $thisScript==\n"; my ($help, $proxy, $username, $password); my $urlsToBeDownloaded = "file-url-list.txt"; my $url = "https:xxxxxxxxxxxxx"; usage() if (@ARGV < 2 or ! GetOptions('proxy:s' => \$proxy, 'username=s' => \$username, 'password=s' => \$password) or defined $help); if ($username eq "" || $password eq "") { usage(); } my $mech = WWW::Mechanize->new(); if($proxy ne ""){ $mech->proxy(['http', 'https'], $proxy); } $mech->get($url);