Help for this page
use IO::Select; my $sock_read_hdl = IO::Select->new(); ... # Now we are ready to read message. Note: $read_ready->[0] == $oSocket + here. eval { ... } or die $@; # As pointed out by ikegami, thanks.
sub read_msg { my ($sock, $bcount, $buf, $msg) = (shift, 0, '', ''); ... # Return success return ($msg, $bcount, ''); }
... ... die "Nothing received!\n" if ($bcount == 0); ...