Zucan has asked for the wisdom of the Perl Monks concerning the following question:
However, the DNS server lists several IP addresses for that hostname (round-robin DNS). Since the DNS server can be changed at anytime to add or remove IP addresses, it is important that I use the hostname.
The problem that I am having is how to determine which IP address I am currently connected to. I am trying to avoid doing a DNS lookup myself on the hostname, and then using the returned IP address for the connection... I am not even sure how to do that, but I may have to go down that road if I can't find a more elegant solution to the problem.
Anyways, is there a way to determine the remote IP address of a currently connected session in Perl?
Thanks,
Zucan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to determine IP address of a remote connection?
by fglock (Vicar) on Dec 02, 2004 at 16:06 UTC | |
by Zucan (Beadle) on Dec 02, 2004 at 16:21 UTC |