Help for this page

Select Code to Download


  1. or download this
    my @a = (shuffle 1 .. $N)[ 0 .. $E ];
    my @b = (shuffle 1 .. $N)[ 0 .. $E ];
    my @c = (shuffle 1 .. $N)[ 0 .. $E ];
    my @d = (shuffle 1 .. $N)[ 0 .. $E ];
    
  2. or download this
    my %comp;
    $comp{ $_ }{a} = 'a' for @a;
    $comp{ $_ }{b} = 'b' for @b;
    $comp{ $_ }{c} = 'c' for @c;
    $comp{ $_ }{d} = 'd' for @d;
    
  3. or download this
    print "     : a b c d\n--------------";
    
  4. or download this
    printf "%4s : %s\n", $_, 
        join ' ', map{ $_||'-' } @{ $comp{ $_ } }{ 'a'..'d' }
        for sort{$a<=>$b} keys %comp;
    
  5. or download this
    for sort{$a<=>$b} keys %comp;
    
  6. or download this
    @{ $comp{ $_ } }{ 'a'..'d' }
    
  7. or download this
    map{ $_||'-' }
    
  8. or download this
    join ' ',
    
  9. or download this
    printf "%4s : %s\n", $_,
    
  10. or download this
       6 : a b - d