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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1007689]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found