Hello Nathaniel,

Friday, November 02, 2001, Wert, Nathaniel <[EMAIL PROTECTED]> wrote:

WN> 1)   I   can   get   gethostbyname   to   work   in  this  format:
WN> gethostbyname('node.foo.com').  I need it to work in the following
WN> format: gethostbyname($nodename). Is this not set up for that?
$nodename='node.foo.com';
$ent=gethostbyname($nodename);
where is your problem?

example:
    use Socket;
    use Net::hostent;
    $h = gethostbyname("www.perl.com");
    print "name:", $h->name," address:",inet_ntoa($h->addr),"\n",

Best wishes,
 Maxim                            mailto:[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to