in reply to Issue on covariance calculation

Not relevant to your performance issues but your chomp; statements inside the two for loops are not doing anything useful. Without an argument, chomp acts on $_ whereas you want it to act on your loop variables. So do chomp $element; and chomp $inside_elem in the outer and inner loops respectively.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Issue on covariance calculation
by Mandrake (Chaplain) on Apr 13, 2007 at 09:28 UTC
    Thanks for the reply. In fact, the previous version of the code was in that way. Forgot to change when modified it.
    for (@data) { . . .
    Thanks for pointing the mistake out.