title: Perl gives: "Use of uninitialized value $k in addition (+) at ./one.pl line 98"
body: <p>Perl gives me this:</p>
  
  <pre><code>Use of uninitialized value $k in addition (+) at ./one.pl line 98, &lt;FILE2&gt; line 2000.
  </code></pre>
  
  <p>The code-snipped is the following:</p>
  
  <pre><code>sub calcMu
  {
    my $sum = 0;
    my $lengStrs = length($_[0]);
    my $lengArray = @_;
    my $k = 0;
    my @result = makeDistMatMu(@_);
  
    for $k (@result) {$sum += $k;}
  
    $sum/($lengStrs * ($lengArray*($lengArray-1)/2));
  }
  </code></pre>
  
  <p>In @result we have for example (0.1, 0.2, 0.1, 0.4, 0.5, 0.1)</p>