my %clients; POE::Component::Server::TCP->new( Alias => 'TCPServer', Port => 53511, ClientConnected => sub { $clients{$_[SESSION]->ID} = 1 }, ClientDisconnected => sub { delete $clients{$_[SESSION]->ID} }, ClientInput => sub { }, InlineStates => { AddPublisher => sub { }, }, ); POE::Session->create( inline_states => { _start => sub { foreach my $client (keys %clients) { $_[KERNEL]->post( $client, AddPublisher => $_[SESSION], 1 ); } }, _stop => sub { }, } ); POE::Kernel->run(); exit;