http://www.perlmonks.org?node_id=884179


in reply to IO Socket - Detect inbound IP

You can use the peerhost (and peerport) methods.

IO::Socket::INET