I like to do this to randomize an array:
my @shuffled = map { $_->[1] } sort { $a->[0] <=> $b->[0] } map { [rand(),$_] } @unshuffled;
Update: This wouldn't work (see OP's update)
-Bryan
In reply to Re: Randomising the order of an array
by mrborisguy
in thread Randomising the order of an array
by g0n
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |