Help for this page

Select Code to Download


  1. or download this
    while ( @list ) {                   # list not empty
        $randint = int(rand(@list));    # pick a random index
        # remove the selected (one) item from @list, and append it to @lis
    +t2
        push @list2, splice(@list, $randint, 1);
    }