Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^6: Dungeons and Dragons die roller (Golf)

by Anonymous Monk
on Nov 07, 2016 at 20:11 UTC ( #1175463=note: print w/replies, xml ) Need Help??


in reply to Re^5: Dungeons and Dragons die roller (Golf)
in thread Dungeons and Dragons die roller (Golf)

Awesome, thank you! With a little bit of experimenting now, I found that rand(4+10) would pick 0...13, but rand('4+10') picks 0...3, ignoring everything beyond the first string of digits. I didn't realize that odd behavior, nor did I realize you could make something like 'd4', which is ignored when evaluating the statement, instead of causing an error. Those seem like odd loopholes in the way Perl works, but that just makes the whole command that much more beautiful. Thanks again!
  • Comment on Re^6: Dungeons and Dragons die roller (Golf)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2023-12-09 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (38 votes). Check out past polls.

    Notices?