You can use the peerhost (and peerport) methods.
IO::Socket::INET
In reply to Re: IO Socket - Detect inbound IP by ikegami in thread IO Socket - Detect inbound IP by sans-clue