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

Re^3: Random generator fail

by Anonymous Monk
on Dec 06, 2012 at 14:07 UTC ( #1007579=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Random generator fail
in thread Random generator fail

forgot to add this:

perl -wle "use 5.10.0; say int foreach (1..100) ;"

Works as rand() should have.


Comment on Re^3: Random generator fail
Download Code
Re^4: Random generator fail
by Anonymous Monk on Dec 06, 2012 at 14:22 UTC

    This one is better

    perl -wle "use 5.10.0; say abs foreach (-5..5) ;" 5 4 3 2 1 0 1 2 3 4 5
Reaped: Re^4: Random generator fail
by NodeReaper (Curate) on Dec 06, 2012 at 14:24 UTC
Re^4: Random generator fail
by MidLifeXis (Monsignor) on Dec 06, 2012 at 17:23 UTC

    Works as rand() should have.
    Either your assumptions are wrong, or the documentation for rand does not match the implementation. Which do you think it is?

    --MidLifeXis

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-07-05 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls