title: perl get ouput in a file along with STDERR and STDOUT
body: <p>In the following command i want to wrtie the output to a file and also get the STDOUT,STDERR in output variable how can i do this</p>
  
  <pre><code>      my( $output) = `ssh login.com ls /tmp  &gt; filename 2&gt;&amp;1`;
         print "\n=========$output============";
  </code></pre>
  
  <p>.</p>