#!/usr/bin/perl use strict; use WWW::Mechanize; use LWP::Protocol::socks; use LWP::Protocol::https; use utf8; my $mech = WWW::Mechanize->new(); $mech->proxy(['http', 'https'], 'socks://localhost:9150'); $mech->get("https://www.google.com");