recv is for datagram protocols (like UDP). You need to use sysread when using a stream protocol (like TCP).
# Send request. print $oSocket $sSend or die("Unable to write to the socket: $!\n"); # Receive response. my $data_read = ""; my $rv; do { $rv = sysread($oSocket, $data_read, 4096, length($data_read)); die("Unable to read from the socket: $!\n") if not defined $rv; } while $rv;
Tested.
Update: Added code.
In reply to Re: No data received on client socket
by ikegami
in thread No data received on client socket
by rbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |