#!/usr/bin/perl use strict; use warnings; use IO::Socket; my $sock = IO::Socket::INET->new(PeerAddr => "127.0.0.1", PeerPort => 31008, Proto => "tcp", Type => SOCK_STREAM ) or die "Can't connect to 31008: $!"; print $sock join(" ", "add", @ARGV), "\n";