You could use sockets. Sockets are the main mechanism that Perl uses to communicate on the network. Here are a couple of intro tutorials to Perl and sockets:
Use libwwwperl to make the HTTP connection (assuming here that it is an HTTP connection you want to make). Set the options in libwwwperl (read perldoc LWP) to use the proxy on the given host name and port number. That should work.
Unless you're doing something really low level there's no need to use sockets directly.