in reply to function to count pending packets in TCP socket

Hello Anonymous Monk,

I found this thread How can I test TCP socket status in Perl?. The accepted answer is:

$socket = IO::Socket::INET(localhost, 1000); die "no connection" unless $socket -> connected(); $socket -> send("your face here for $20"); die "socket is dead" unless $socket -> connected(); $socket -> recv($data);

Let us know if it works, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!