$ cat t.pl #!/usr/bin/perl my @a = (0.001) x 41; my $sum=0; $sum += $_ for @a; print "Avg: ", $sum/40, "\n"; $ perl t.pl Avg: 0.001025