isn't always defined, depending on VPN, proxies, etc.
Second, you were seeking an IP- $ENV{REMOTE_HOST} is a name, which can presumably resolve to an IP, but the same network restrictions may apply for both.
Last,
probably uses %ENV as well, so the IP may or may not be defined.my $q = new CGI; my $userIP = $q->remote_addr();
in the simple-case, you MAY be able to get the IP. In a secure corporate case like ours, it dubious. I suspect the replies that stated use $ENV{REMOTE_ADDR} only use this on simple networks. In my world and perhaps yours, things just aren't that easy;I wish they we're since this *simple* IP is in-fact a major PAIN for us.
In reply to Re: Can my perl scripts get the IP address that called the script?
by misterperl
in thread Can my perl scripts get the IP address that called the script?
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |