in reply to DNScmd in perl script

Hey All, I have Dnscmd command in my perl script.

You have glaring errors in your script. Running it as you posted it, results in

syntax error at - line 5, near "else" Missing right curly or square bracket at - line 6, at end of line Execution of - aborted due to compilation errors.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: DNScmd in perl script
by ajd335 (Novice) on Jul 28, 2008 at 21:15 UTC
    Hi Shmen , I forget to copy the closing bracket for the If statment the code is
    $domain = "abc.com"; @zones = `dnscmd $domain /EnumZones`; if ($?) { print "Error "; } else "zones done";
      if ($?) { print "Error "; } else "zones done";

      You are still missing curlies.