Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Dungeons and Dragons die roller (Golf)

by Tanktalus (Canon)
on Oct 24, 2016 at 17:25 UTC ( #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? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2021-09-16 19:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?