my $finaldata; my @protocols = qw(http https ftp); my $query_url = 'https://www.etrade.com/'; my $ua = LWP::UserAgent->new( agent => 'yourstring'); $ua->protocols_allowed( \@protocols ); $ua->proxy('http://1.2.3.4:3128/'); my $response = $ua->get("$query_url", ':content_cb' => \&stitch, ); sub stitch { my($data, $response, $protocol) = @_; print $data; return $finaldata .= $data; }