in reply to IO Socket - Detect inbound IP
As Ikegami pointed out, the easy way is peerhost. Try it like this...
print $new_sock->peerhost, " said $_";
Bought a souvenir
Emailed all my friends about it
Got blowed up
Hit him right dead in the jaw
Made it awkward
Took a selfie
Want to go home
Results (337 votes). Check out past polls.