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


in reply to Re^2: rand + shift || pop
in thread rand + shift || pop

Shuffleing is O(n) and spliceing is O(1), this may matter if your array is large.

Update: Oops, my understanding of splice was wrong. See JavaFan and ikegami below.