title: Issue with AWK array length?
body: <p>I have a tab separated matrix (say filename).</p>
  
  <p>If I do:</p>
  
  <pre><code>head -1 filename | awk -F "\t" '{i=0;med=0;for(i=2;i&lt;=NF;i++) array[i]=$i;asort(array);print length(array)}'
  </code></pre>
  
  <p>followed by:</p>
  
  <pre><code>head -2 filename | tail -1 | awk -F "\t" '{i=0;med=0;for(i=2;i&lt;=NF;i++) array[i]=$i;asort(array);print length(array)}'
  </code></pre>
  
  <p>I get an answer of 24 (same answer) for all rows basically.</p>
  
  <p>But if I do it:</p>
  
  <pre><code>cat filename | awk -F "\t" '{i=0;med=0;for(i=2;i&lt;=NF;i++) array[i]=$i;asort(array);print length(array)}'
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>24
  25
  25
  25
  25 ...
  </code></pre>
  
  <p>Why is it so?</p>
  
  <p>Following is the inputfile:</p>
  
  <pre><code>Case1   17.49   0.643   0.366   11.892  0.85    5.125   0.589   0.192   0.222   0.231   27.434  0.228   0   0.111   0.568   0.736   0.125   0.038   0.218   0.253   0.055   0.019   0   0.078  
  Case2   0.944   2.412   4.296   0.329   0.399   1.625   0.196   0.038   0.381   0.208   0.045   1.253   0.382   0.111   0.324   0.268   0.458   0.352   0   1.423   0.887   0.444   5.882   0.543  
  Case3   21.266  14.952  24.406  10.977  8.511   21.75   6.68    0.613   12.433  1.48    1.441   21.648  6.972   42.931  8.029   4.883   11.912  6.248   4.949   26.882  9.756   5.366   38.655  12.723  
  Case4   0.888   0   0.594   0.549   0.105   0.125   0   0   0.571   0.116   0.019   1.177   0.573   0.111   0.081   0.401   0   0.05    0.073   0   0   0   0   0.543
  </code></pre>