I leave the AddRolls sub as an exercise for the reader.use strict; my @rolls; foreach (0..3){ my $roll = 1; while ($roll == 1) { $roll = int(rand(6) + 1) ; } $rolls[$_]= $roll; } @rolls =reverse sort @rolls; pop @rolls; print @rolls; &AddRolls(\@rolls);
C-.
In reply to Re: Trick die rolling
by cacharbe
in thread Trick die rolling
by ellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |