in reply to Code Review! Go Ahead, Rip It Up!
I'm sure this isn't the answer you were looking for, but honestly, look in CPAN for general things like this. You'll save yourself a lot of missteps. For instance, Statistics::Descriptive seems to be just what you wanted.
That's how I'd do it, anyway.use Statistics::Descriptive; my $s = Statistics::Descriptive->new(); $s->AddData(22, 17, 29, 39, 20, 32); print "The standard deviation is ", $s->StandardDeviation();
HTH
|
|---|