title: Capture the output of Perl's 'system()'
body: <p>I need to run a shell command with system() in Perl. For example,</p>
  <pre><code>system('ls')
  </code></pre>
  <p>The system call will print to <a href="https://perldoc.perl.org/perlglossary#standard-output" rel="nofollow noreferrer">STDOUT</a>, but I want to capture the output into a variable so that I can do future processing with my Perl code.</p>