Help for this page

Select Code to Download


  1. or download this
    sub stable_shuffle {
    # VERY BROKEN, do not use!
    # My intent was to turn the seed into a number,
    ...
    #    my $seed = join '', map ord, split //, shift;
    #    return map {splice(@_, $seed % @_, 1)} @_;
    }
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    use List::Util 'shuffle';
    my @arr = ('A' .. 'Z');
    print "$_\n" for shuffle @arr;