title: Perl system return code 65280 and success
body: <p>I'm running a Perl script in which I use the command <code>system</code> to execute a <code>SSH</code> connection.</p>
  
  <p>It looks like this :</p>
  
  <pre><code>$test_result = '/home/ergaconfigs/sauvegarde-configs/configs/test';
  
  sub ssh_connect {
          my $test = system (`ssh -i /home/ergaconfigs/sauvegarde-configs/rsa_keys/key_config_saver -o "StrictHostKeyChecking no" ergaconfigs\@10.252.0.27 "show configuration | display set" &gt; $test_result `);
  
          print "resultat de la commande : $test \n le code d erreur est $!";
  }
  </code></pre>
  
  <p>But I want to make sure that the SSH connection succeeded. This is why I'm looking at the return code of <code>system</code>.<br>
  As the <strong>SSH connection succeed and the file is correctly written</strong>, the output is:</p>
  
  <pre><code>resultat de la commande : 65280
  le code d erreur est 
  </code></pre>
  
  <p>And whatever the result of the ssh connection is (network unreachable etc..) I have the same output. Can somebody explain me why?</p>