in reply to Re: DNScmd in perl script
in thread DNScmd in perl script

Hi Almut, Yes , But if I try the
C:\ > dnscmd servername /EnumZones
is giving me the correct result on Dos prompt.

Replies are listed 'Best First'.
Re^3: DNScmd in perl script
by almut (Canon) on Jul 28, 2008 at 21:38 UTC

    Presumably you have different environments. Try specifying the full path to the program. Also, in case $? is -1 (and only then), print $! to see the system error message.

      Hi Almut, Yes , giving $! shows that No Such file or directory..What is causing that.....

        I personally believe that it has already been clearly explained to you: namely "No Such file or directory" means that there's no such file or directory. Where perl can possibly look for it, that is. That you can use the same command from your shell simply means that your shell knows where to look: just give perl the same info. You can either pass through the shell anyway, which I do not recommend (why spawn another process?) or give the full path to the program, which may be sensible in any case: what if someone puts an identically named program in some directory which comes first in your path? (Ok, this is an extremely minor detail...)

        --
        If you can't understand the incipit, then please check the IPB Campaign.