title: How can I check the status of the first program in pipeline in Perl's system()?
body: <pre><code>perl -e 'system ("crontab1 -l");print $?'
  </code></pre>
  
  <p>returns -1 as expected (program crontab1 doesn't exist)</p>
  
  <pre><code>perl -e 'system ("crontab1 -l|grep blah");print $?'
  </code></pre>
  
  <p>returns 256.</p>
  
  <p>What is the way to check the status of the first (or both) programs?</p>