REMOTE_ADDR environment variable. Here is a little snippet to show you ALL the environment variables:
#!/usr/local/bin/perl -wT
use strict;
use CGI ':standard';
print "Content-type: text/html\n\n";
print "<html><head><title>Environment Variables</title></head><body>";
foreach (keys %ENV) {
print "<br /><font color=red>$_</font> is set to <font color=blue>$ENV{$_}</font>";
}
print "</body></html>";
my $http_x_forward_far;
my $http_x_forward;
$http_x_forward_far = $ENV{'HTTP_X_FORWARDED_FOR'};
$http_x_forward_far = "" if!defined($http_x_forward_far);
$http_x_forward = $ENV{'HTTP_X_FORWARDED'};
$http_x_forward = "" if!defined($http_x_forward);
if ($http_x_forward_far)
{
print "ForFarX :: $http_x_forward_far\n";
}
if ($http_x_forward)
{
print "ForX :: $http_x_forward\n";
}
GGG