Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 meditating upon the Monastery: (11)
As of 2014-10-30 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (207 votes), past polls