I am trying to make a feable attempt at parsing a nslookup call.  All I actually want 
is the IP address.  So I figured I would do the following:

$ticker = 0;
foreach $_ (`nslookup $nodename`) {
  $_ = $out[$ticker];
  $ticker++;
}

print $out[0];

I am getting a uninitalized error for $out[0].  Three questions:

1) What am I doing wrong with this?  I am not sure why this is not working.
2) I orginally thought that $_ was a array value and I could just do a "$_ = @foo".  I 
have found that I am mistaken.  Is there any way to get the output into an array from 
by line of input?
3) General suggestions on an easier way to do this.  Is there an actual function that 
will do an nslookup or get the ip address of a nodename?

Thanks.

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

Reply via email to