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


in reply to Randomize an array

Well, if you don't want to install yet another module, and the randomness you seek is no better than the one provided by rand, you can try the following:
sort { (-1,0,1)[rand 3] } @array