Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 (Prior) 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 surveying the Monastery: (5)
As of 2014-09-16 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (50 votes), past polls