Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by Anonymous Monk
on Dec 07, 2012 at 05:47 UTC ( #1007689=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

Are you confusing the element at index 0 with 0 elements- e.g. the empty list? I want to the empty list with equal probability, and my solution does that. I'm just looking for a more succinct way to express it.


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-07 17:39 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 (93 votes), past polls