By "randomize" I assume you mean "shuffle" (rearrange all
the elements in a random fashion). The fastest and
probably best way is to use the
Algorithm::Numerical::Shuffle.
use Algorithm::Numerical::Shuffle qw /shuffle/;
@shuffled = shuffle (1, 2, 3, 4, 5, 6, 7);