use strict; use warnings; use IO::Socket; my $sock = new IO::Socket::INET ( PeerAddr => 'perlplexity.org', PeerPort => 1200, Proto => 'tcp', ); die "Socket could not be created. Reason: $!\n" unless $sock; $sock->send("HELLO\n"); close ($sock);