[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hostname



Anmar, I was working on a script and needed to attain the domainname
to no avail.  Looks like our setup is a bit messed-up in that regard.
Here is a very simple perl script to show the problem.

#!/usr/bin/perl

use Net::Domain;

my $hostname   = &Net::Domain::hostname();
my $hostdomain = &Net::Domain::hostdomain();
my $domainname = &Net::Domain::domainname();
my $hostfqdn   = &Net::Domain::hostfqdn();

print "hostname   --> $hostname\n";
print "hostdomain --> $hostdomain\n";
print "domainname --> $domainname\n";
print "hostfqdn   --> $hostfqdn\n";


What you should see is,

  hostname   --> sina
  hostdomain --> arabeyes.org
  domainname --> sina.arabeyes.org
  hostfqdn   --> sina.arabeyes.org

instead I'm getting,

  hostname   --> sina
  hostdomain -->
  domainname --> sina
  hostfqdn   --> sina

which is obviously wrong (looks like hostdomain is simply not set).
Let me know if I've overlooked something.

Salam.

 - Nadim


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools