in reply to How do I get Perl to run nslookup?

The easiest way to do it is pass the info in on the commandline, instead of trying to run the commands in interactive mode (which can be done, but involves much more work) for all the options to nslookup, do man nslookup, but on my system you do 'nslookup host server' so your first example would be
$response = `nslookup gunfreekids.org ns1.abs.net`;
it is usually goo to give the full path of your executable, though, such as /usr/bin/nslookup
                - Ant

Replies are listed 'Best First'.
Re: Re: How do I get Perl to run nslookup?
by kleinbiker7 (Sexton) on May 08, 2001 at 23:02 UTC
    Hey suaveant, Thanks for your excellent response. I ran the idea with my boss, and she likes the idea. It also produces less red-tape from UNIX than my previous example. Will definately ask you, or the other gurus for help, should the problem arise. Robert
      No problem...

      many unix utils have command-line utils so they can be called from scripts or as an alias, but if all else fails you need a package like Expect which pretends to be a user, basically...
                      - Ant