use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->proxy(['http', 'https'], 'http://xx.xx.x.xx:xx'); print $mech->get("https://example.com"); #### use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->proxy(['http', 'https'], 'http://xx.xx.x.xx:xx'); print $ua->get("https://example.com");