use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->proxy('http', 'http://192.168.1.1:8080/'); my $req = new HTTP::Request GET => 'http://www.google.com'; $req->content_type('application/x-www-form-urlencoded'); $req->content('match=www&errors=0'); my $res = $ua->request($req); $res->is_success ? print $res->content : print $res->error_as_HTML; #### /usr/local/squid/bin/client -h 192.168.1.1 -p 8080 http://www.google.com