Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    use List::Util qw(shuffle);
    ...
    @bag = shuffle(@bag);    # Shuffle the bag and store the results
    my @values = @bag[0..4]; # Get the first 5 results with an array slice
    print "Your numbers are @values\n";