I am trying to use a http proxy in my perl script, specifically tinyproxy. I keep getting an error "error in socket creation". can someone point out my errors and how to fix them please, would be very grateful.
my $mech = WWW::Mechanize->new(); my $socket = new IO::Socket::INET ( LocalHost => '127.0.0.1', LocalPort => '8888', Proto => 'http', Listen => 5, Reuse => 1
) or die "ERROR in Socket Creation : $!\n";
$socket->proxy(['http'], 'http://127.0.0.1:8888'); $mech->get("http://blockexplorer.com/q/getreceivedbyaddress/".$btcaddress); # Check transactions on bitcoin address my $getreceived = $mech->content;