#!/usr/bin/perl -w use IO::Socket; use strict; my $socket = IO::Socket::INET->new( Listen => 5, Reuse => 1, LocalPort => 13579, Proto => 'tcp', )||die "couldn't open socket : $!\n"; my $new_socket = $socket -> accept(); #so far so good #if the is $something_to_say syswrite $new_socket, "$something_to_say\n";