Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
which works fine on machines with only a modem. I falls down when the client has a NIC in the macine as well. For example, if you have an address of 192.168.1.1 on your network card and an address on your modem of 10.1.0.1 then you are considered to be a local user as $addr returns 192.168.1.1 rather than 10.1.0.1. Because the clients are multiple versions of windows can’t use ipconfig and regex. If anyone can help that would be great.use Socket; use Sys::Hostname; my $host = hostname(); my $addr = inet_ntoa(scalar(gethostbyname($name)) || 'localhost');
Edit Masem 2001-11-27 - Code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple IP Addresses
by mce (Curate) on Nov 27, 2001 at 15:58 UTC |