http://www.perlmonks.org?node_id=982174


in reply to Pick random element from array and delete it

I dont think I can use splice here as I dont know the index of the random element I just picked...

If you are comfortable with a splice-solution, you may change the way you select your random element: just select a random index (instead of the element itself.)

HTH, Rata