Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: is rand random enough to simulate dice rolls?

by GrandFather (Saint)
on Jan 04, 2021 at 00:34 UTC ( #11126251=note: print w/replies, xml ) Need Help??


in reply to Re: is rand random enough to simulate dice rolls?
in thread is rand random enough to simulate dice rolls?

D1: 1 1 1 1 1 1 D2: 1.50264 1.50089 1.49874 1.4986 1.49999 1.50096 D3: 1.99666 2.00076 1.99974 2.00305 1.99855 2.00081 D4: 2.49717 2.50553 2.49876 2.50477 2.50204 2.50298 D6: 3.49901 3.50656 3.49592 3.49852 3.51048 3.49704 D8: 4.49035 4.50043 4.48853 4.49734 4.49567 4.49206 D10: 5.50564 5.48776 5.50685 5.50959 5.50021 5.50671 D20: 10.50074 10.48721 10.49889 10.50993 10.48554 10.52566 D100: 50.45232 50.43541 50.54345 50.61081 50.64355 50.45597 Perl v5.30.1 MSWin32n

I added:

print "Perl $^V\ $^On";

As pointed out by the sharp eyed shmem, kcott and NetWallah, I fat fingered the \ for the \n. Thanks guys. I've leaving the error version to keep myself humble.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^3: is rand random enough to simulate dice rolls?
by shmem (Chancellor) on Jan 04, 2021 at 07:17 UTC
    I added:
    print "Perl $^V\ $^On";

    Move that backslash a bit to the right. ;)

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

      More like 32 bits to the right, but yes. Must be something to do with the holiday spirit (see end).

      Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

        My preferences: Laphroaig, Talisker, Ardbeg.

        perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2021-04-19 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?