Why does my Perl backticks complain "sh: line 1: any: command not found"? -


I have never programmed before but it is necessary to write a very easy webpad for work.

I am trying to work this DIG query:

  dig @ 8.8.8.8 + nocomments + nostats + noquestion + nocmd google.com Any   

:

  $ dig = `/ usr / bin / dig \ 8.8.8.8 + nocomments + nostats + noquestion + nocmd $ query Any `; Except that it does not recognize "any" at the end of the excavation and gives me:  
  sh: line1: any: command No  

What stupid simple thing am I doing wrong?

I bet that there is a new line in $ query The shell helps to see any as a new command.

Try chomp $ query; Before removing the new line, more than your system call.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -