... my @clientConnections : shared; # several worker threads threads->create( \&handleClients, ( \@clientConnections ) ); while ( my $client = $httpd->accept) { push @clientConnections, share_clone( $client ); } sub handleClients { ... }