#!/usr/bin/perl -wT use strict; use CGI qw( :standard ); use IO::Socket; my $client = IO::Socket::INET->new ( PeerAddr => $clientIP, PeerPort => $clientPort, Proto => "tcp", Type => SOCK_STREAM, Timeout => 10 ); $client or die $@, "\n"; #Remainder of code...