http://qs321.pair.com?node_id=695757


in reply to Re: Random Derangement Of An Array
in thread Random Derangement Of An Array

I think you meant
swap(\$a[$i], \$a[$random]);
Which looks like it may work. But randomness always got me confused (and into furious rows with my math teacher, but that's another story).