http://www.perlmonks.org?node_id=1173026

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?

$thanks++