Help for this page

Select Code to Download


  1. or download this
    @arr = qw ( up down in out left right );
    
  2. or download this
    @sel = ( 1, 3, 4 );
    
  3. or download this
    @my_items = Magic(@arr, @sel);
    
  4. or download this
    $bitmask = MoreMagic(@arr, @sel);
    
    [...other work...]
    
    @my_items = BetterMagic(@arr, $bitmask);
    
  5. or download this
    @arr = qw ( up down in out left right );  # 6 elements
    @sel = ( 1, 3, 4 );
    ...
       printf("\$item: $item  \$mask: %0b\n", $mask);
    }
    printf("    final \$mask: %0b\n", $mask);