title: Unexpected leading spaces while using wc -l command
body: <p>I am trying to execute the below command - but the output has some leading space introduced.</p>
  
  <pre><code>ls -lrt | wc -l
       29
  echo $SHELL
  /bin/bash
  </code></pre>
  
  <p>When I run the same command on a different machine,the output is as expected.</p>
  
  <pre><code>ls -lrt | wc -l
  183
  echo $SHELL
  /bin/bash
  </code></pre>
  
  <p>The leading spaces is causing my perl validation to fail</p>
  
  <pre><code>unless ( $phCountRet-&gt;{COUNT} =~ /^\d+$/ ){
  ...
  }
  </code></pre>
  
  <p>I can opt to trim the leading white spaces and then do the validation,but it wont be a clean solution.</p>
  
  <p>Any pointer as to what might be causing this will be a great help.</p>