in reply to Re^3: IO Socket - Detect inbound IP
in thread IO Socket - Detect inbound IP

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: IO Socket - Detect inbound IP
by Anonymous Monk on Jan 25, 2011 at 21:13 UTC
    I have tried inet_ntoa and peerhost, both run without error, but do not return an ip address. Is 'Ass' your only mode of reply ?

    Sure, thats what you say, but 1) you don't show your code 2) the documentation contradicts you 3) tests contradict you

Re^5: IO Socket - Detect inbound IP
by ikegami (Patriarch) on Jan 25, 2011 at 22:06 UTC

    Really? You're taking offense at "Don't blame the tool if you don't understand its output."? Well, I take offense at unfounded accusations, so I guess we're in the same boat.

    $ perl -MIO::Socket::INET -E'say IO::Socket::INET->new(LocalPort=>6969 +, Listen=>1)->accept->peerhost' 192.168.3.58

    Feel free to prove me wrong. "peerhost runs without error but do not return an ip address" doesn't cut it.

    Update: Apparently, I was a little off about the return value from accept, but peerhost does work.