in reply to Re^2: two dice question
in thread two dice question
Or (with modular help) skip the multiple heredocs:
my $dice = YAML::Syck::Load( <<'EOT' ); --- - |- --------- | | | # | | | --------- - |- --------- | # | | | | # | --------- - |- --------- | # | | # | | # | --------- - |- --------- | # # | | | | # # | --------- - |- --------- | # # | | # | | # # | --------- - |- --------- | # # | | # # | | # # | --------- EOT print $dice->[int(rand(@{$dice}))], "\n";
(Using Anonymonk's better looking (IMHO) dice from below)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: two dice question
by ikegami (Patriarch) on Jul 17, 2007 at 17:12 UTC | |
by Fletch (Bishop) on Jul 17, 2007 at 17:18 UTC | |
by ikegami (Patriarch) on Jul 17, 2007 at 17:54 UTC | |
by Fletch (Bishop) on Jul 17, 2007 at 19:37 UTC |