hostname.pl enhancement

Bill Maloy (maloy@kittyhawk.nrlssc.navy.mil)
Tue, 1 Nov 1994 16:53:04 -0600


Using hostname.pl v1.1 on an NIS'd SunOS 4.1.3 system with
Perl 4.0.1.8p36, user-agent fields were not getting a fully
qualified domain name.

The simple solution was to add a "." to the string passed to the
gethostbyname() function:

    ($FQDN, $aliases, $addrtype, $len, @addrs) = gethostbyname("$host.");