use Socket;
use Sys::Hostname;
my $host = hostname();
- my $addr = inet_ntoa(scalar(gethostbyname($name)) || 'localhost');
+ my $addr = inet_ntoa(scalar(gethostbyname($host || 'localhost')));
Probably the simplest way to learn your DNS domain name is to grok
it out of /etc/resolv.conf, at least under Unix. Of course, this