#!/usr/local/bin/perl
# counts the random rolling of dice 100 times
$count = 1;
srand(time);
while ($count <= 100) {
$randnum = int( rand(6) ) + 1;
$randtotal[$randnum] += 1;
$count++;
}
# print the total of each number
$count = 1;
print ("Total for each number:\n");
while ($count <= 6) {
print ("\tnumber $count: $randtotal[$count]\n");
$count++;
}