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