ellem has asked for the wisdom of the Perl Monks concerning the following question:
I get output like:#! /usr/local/bin/perl use warnings ; use strict ; #Die Roller: uses 4d6 discarding the lowest number #rerolling any roll of 1 my $roll = 6 ; until ($roll == 0) { chomp $roll ; $roll -- ; my $d61 = int(rand(6) + 1) ; my $d62 = int(rand(6) + 1) ; my $d63 = int(rand(6) + 1) ; my $d64 = int(rand(6) + 1) ; print "$d61, $d62, $d63, $d64\n\n" ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trick die rolling
by Juerd (Abbot) on Mar 10, 2002 at 17:20 UTC | |
|
Re: Trick die rolling
by cacharbe (Curate) on Mar 10, 2002 at 17:29 UTC | |
|
Re: Trick die rolling
by atcroft (Abbot) on Mar 10, 2002 at 21:44 UTC | |
|
Re: Trick die rolling
by TStanley (Canon) on Mar 11, 2002 at 01:27 UTC | |
|
Re: Trick die rolling
by Parham (Friar) on Mar 10, 2002 at 23:17 UTC | |
|
Re: Trick die rolling
by johannz (Hermit) on Mar 10, 2002 at 23:03 UTC |