#!/usr/bin/perl
$s = 0;
$t = 100;

for($i = 0; $i < $t; $i++) {
    $s = $s + int(rand(6)) + 1;;
}

$a = ($s / $t);

print "The sum is $s.\nThe average is $a.\n";

