What you have there is essentially a shuffle and join. Using splice to shuffle is tempting, but inefficient. perlfaq4 already covers this topic well, and List::Util's shuffle makes it convenient.
In reply to Re: Re: Re: Choose random element of array?
by Somni
in thread Choose random element of array?
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |