Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Idiom to return 0 or random number of array elements

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


in reply to Re: Idiom to return 0 or random number of array elements
in thread Idiom to return 0 or random number of array elements

Can someone explain why this code produces key values in %stats hash that range "0" to "9"?

The key values, representing the number of elements in the random-length generated arrays should range from "1" to "10", since all generated arrays contain at least one element.


Comment on Re^2: Idiom to return 0 or random number of array elements
Replies are listed 'Best First'.
Re^3: Idiom to return 0 or random number of array elements
by Anonymous Monk on Dec 07, 2012 at 16:01 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2015-07-30 10:34 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 (271 votes), past polls