#!/usr/bin/perl use POE; use POE::Component::Server::TCP; use strict; POE::Component::Server::TCP->new ( 'Alias' => "echo", 'Port' => 2000, 'ClientInput' => sub { my ( $session, $heap, $input ) = @_[ SESSION, HEAP, ARG0 ]; $heap->{client}->put($input); } ); $poe_kernel->run(); exit 0;