in reply to Re^2: Bidirectional Communication using sockets and forking
in thread Bidirectional Communication using sockets and forking
That was the first initial thing I tried, at the Server.pl program
Did you have it in Client.pl, too? With if (defined($child_pid)), the client would never execute its read loop either, i.e.
while(my $line = <$socket>){ print "SERVER says: $line\n"; }
With the mentioned change in both Server.pl and Client.pl, your code works fine for me... — except that you may not want to add another empty line every time the server sends a line to the client (the superfluous "\n" in print $client "$line\n"; ).
|
|---|