title: how to capture the exit status of capture calling another perl script within a perl script and if it fails it should die
body: <p>I've just started using Perl 5.26 on secure-CRT and i wrote a Perl script that capture calls multiple Perl scripts. </p>
  
  <pre><code> my @secondCommand = capture("perl clientquery.pl -r $cid -l test.log -is $sqlFile");
  </code></pre>
  
  <p>I was wondering how can I capture the exit status of each capture calling and if it fails how can i make the original script die.</p>