in reply to unsorted list

There's always the Fisher-Yates shuffle in perlfaq4 or the pleac version:
sub fisher_yates_shuffle { my $array = shift; my $i; for ($i = @$array; --$i; ) { my $j = int rand ($i+1); next if $i == $j; @$array[$i,$j] = @$array[$j,$i]; } } fisher_yates_shuffle( \@array );

Replies are listed 'Best First'.
Re^2: unsorted list
by thekestrel (Friar) on Apr 25, 2005 at 01:45 UTC
    Thanks eibwen,
    This is the method that I ended up going with. Nice and clean and didn't require another module. Its working a treat =).

    Regards Paul.