60 byte solution, not counting hashbang, to take strings that look like '2d4' or '2d4+10' and give you the result:
-n ($d,$s,$=)=split/d|\+/;$=+=1+rand $s for 1..$d;print$=,$/
Anyone wants to try and beat my record?
In reply to Dungeons and Dragons die roller (Golf) by zsl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |