in reply to Is there a simpler way??

Here is one way I put together where I assume @values to already contain the data from the DAT file mentioned. Code untested.
# compute average $total += $_ for @values; $average = $total / @values; # compute stddev according to your method $total_deviation += ($_ - $average)**2 for @values; $standard_deviation = sqrt($total_deviation) / @values; # compute stddev as I recall it, probably wrong $total_deviation += abs($_ - $average) for @values; $standard_deviation = $total_deviation / @values;

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.