in reply to IP

There are various setups that will cause the remote_addr to be the local machine (127.0.0.1). Most that I've seen will set some other environment variable before overwriting $ENV{REMOTE_ADDR}, You might try $ENV{HTTP_PROXY} $ENV{FORWARDED_FOR} or $ENV{X_HTTP_FORWARD}. Since it varies between systems, my advice would be to just dump your %ENV and take a look, like so:

print "$_ => $ENV{$_}\n" for (keys %ENV);

-Blake