in reply to Re^3: Getting client ip address from socket connect
in thread Getting client ip address from socket connect

One thing that I would change is the die unless that you have, you could probably rewrite that to this:
my $server = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $serverport, Listen => SOMAXCONN, Reuse => 1) or die("Can't setup server: $!");

I'm not 100% sure that that will work though, I haven't really gone near IO::Socket.
Spidy