title: How to suppress or redirect to the variable output of the system command
body: <p>I am trying to execute system command for example     </p>
  
  <pre><code> system('git clone .....' );
      if ($?) {
          croak('Error while cloning git repository');
      }
  </code></pre>
  
  <p>Here I am checking if result is success, but how not to output the error from the system command, for example in my case, I can get somthing like   </p>
  
  <pre><code>Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>From executed command.<br>
  I need to get this error into the variable and suppress it(don't print this to the terminal)<br>
  And than check this error message.<br>
  Or at least just supress it.<br>
  I need to test such subroutine in the following way    </p>
  
  <pre><code>dies_ok { MyModule::sub_uses_system_command() } 'Died :(';
  </code></pre>
  
  <p>Is it possible to get such result ?<br>
  Thx in advance.</p>