title: Using pipe when executing command in perl
body: <p>I am trying to use following command in perl but it giving me error</p>
  
  <pre><code>system("zcat myfile.gz | wc &gt; abc.txt");
  </code></pre>
  
  <p>But when i run this I am getting error 
  syntax error near unexpected token `|'</p>
  
  <p>Even if I remove <code>&gt;abc.txt</code> I am still getting error.</p>
  
  <p>Can we use pipe with system command?</p>
  
  <p>Here are error details:</p>
  
  <pre><code>sh: -c: line 1: syntax error near unexpected token `|'
  sh: -c: line 1: ` | wc '
  </code></pre>