Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @list = shuffle('A'..'N', 'I'..'K');
    my $pick = 'J';
    print sort {(($a lt $pick) == ($b lt $pick)) ? ($a cmp $b) : ($b cmp $
    +a)} @list;
    
  2. or download this
    use strict;
    use warnings;
    ...
    my $pick = 'J';
    ++(my $after_pick = $pick);
    print map substr($_,1), sort map {$_ lt $pick ? "$after_pick$_" : "$pi
    +ck$_"} @list;