On Fri, Nov 02, 2001 at 05:18:37PM -0500, Wert, Nathaniel wrote:
> $nodename = <STDIN>;
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 why
> gethostbyname does not return anything. I have tried with both the
> hostname and the hostname.foo.com notation and it does not work.
>
> It does work when I replace $nodename with 'node.foo.com' but I can't
> get the imputed variable to work?
Need to get rid to the line ending.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]