Re: gethostbyname and getnetbyname

2001-11-02 Thread Paul Johnson
On Fri, Nov 02, 2001 at 05:18:37PM -0500, Wert, Nathaniel wrote: > $nodename = ; chomp $nodename; > $iaddr = gethostbyname($nodename); > ($a,$b,$c,$d) = unpack('C4',$iaddr); > $ipaddress = "$a.$b.$c.$d"; > print $ipaddress; > > I have debugged this numerous times and I can't seem to understand

RE: gethostbyname and getnetbyname

2001-11-02 Thread Wert, Nathaniel
I just realized I was not chomping . Thanks. -Original Message- From: Wert, Nathaniel Sent: Friday, November 02, 2001 5:19 PM To: 'Maxim Berlin' Cc: '[EMAIL PROTECTED]' Subject: RE: gethostbyname and getnetbyname Maybe it comes in the statement before that:

Re[2]: gethostbyname and getnetbyname

2001-11-02 Thread Maxim Berlin
Hello Nathaniel, Saturday, November 03, 2001, Wert, Nathaniel <[EMAIL PROTECTED]> wrote: WN> Maybe it comes in the statement before that: WN> $nodename = ; :) you forgot chomp $nodename; here. $nodename contains '\n' at the end. WN> $iaddr = gethostbyname($nodename); WN> ($a,$b,$c,$d) = unpack

RE: gethostbyname and getnetbyname

2001-11-02 Thread Wert, Nathaniel
[mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 4:54 PM To: [EMAIL PROTECTED] Subject: Re: gethostbyname and getnetbyname Hello Nathaniel, Friday, November 02, 2001, Wert, Nathaniel <[EMAIL PROTECTED]> wrote: WN> 1) I can get gethostbyname to work in this format:

Re: gethostbyname and getnetbyname

2001-11-02 Thread Maxim Berlin
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?

gethostbyname and getnetbyname

2001-11-02 Thread Wert, Nathaniel
Thank you for the help earlier, but I am still having a problem. 1) I can get gethostbyname to work in this format: gethostbyname('node.foo.com'). I need it to work in the following format: gethostbyname($nodename). Is this not set up for that? 2) I tried to alternatively use getnetbyname,