in reply to Re^2: client IP
in thread client IP

No, STDOUT is the filehandle for the print statement. Also note, that $s->io_handle->connected can be undefined if no connection is done so far. You should read the docs.
my $ip = inet_ntoa((unpack_sockaddr_in($s->io_handle->connected))[ +1]);
Boris

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.