Here is one way I put together where I assume @values to
already contain the data from the DAT file mentioned. Code untested.
in reply to Is there a simpler way??
# 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;