in reply to Capturing STDERR with -

I suggest you to use Net::DNS. It is not very hard since there is no complex output handling. It has quite simple API and it doesn't require you to do any parsing.

P.S. Another reason to avoid nslookup is that it is deprecated.

bash-2.05a$ nslookup Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup wit +h the `-sil[ent]' option to prevent this message from appearing.

--
Ilya Martynov (http://martynov.org/)

Replies are listed 'Best First'.
Re: Re: Capturing STDERR with -
by DrManhattan (Chaplain) on Dec 07, 2001 at 19:02 UTC
    At a guess, nslookup is probably only "deprecated" on a couple of linux distributions.
    $ uname -imprs SunOS 5.8 sun4u sparc SUNW,UltraAX-i2 $ host zsh: command not found: host $ dig zsh: command not found: dig $ nslookup Default Server: bastion.cox.com Address: 206.98.131.2 >

    -Matt

      Actually it have been deprecated by bind maintainers. Some linux distributions do have latest bind but thats all.

      --
      Ilya Martynov (http://martynov.org/)