Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Dungeons and Dragons die roller (Golf)

by Tanktalus (Canon)
on Oct 24, 2016 at 17:25 UTC ( [id://1174609]=note: print w/replies, xml ) Need Help??


in reply to Dungeons and Dragons die roller (Golf)

To steal choroba's post:

echo 2d12+13 | \ perl -ple ' ($d,$s,$_)=split/[d+]/;map$_+=1+rand$s,1..$d ' 1 2 3 4 12345678901234567890123456789012345678901234

Replies are listed 'Best First'.
Re^2: Dungeons and Dragons die roller (Golf)
by Grimy (Pilgrim) on Oct 25, 2016 at 16:07 UTC
    This always prints 13, which is not a possible result for 2d12+13.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1174609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-03-28 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found