in reply to TCP Server using fork to accept multiple requests

You likely want to add an inner loop to keep on reading:

... if ($pid == 0) { # This is the fork child while( $new_sock->connected ) { $new_sock->recv(my $data, 500); print "$data\n"; } }

Replies are listed 'Best First'.
Re^2: TCP Server using fork to accept multiple requests
by Lucas Rey (Sexton) on Aug 17, 2022 at 09:41 UTC
    Thank you Corion, this is working perfect!!