Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    
  2. or download this
    my @ranges = (
        [17, 19], [34, 39], [26, 29], [53, 57], [43, 47], [58, 59], [40, 4
    +5],
        [30, 33], [20, 24], [10, 15], [ 6,  9], [ 1,  4], [35, 45], [ 7, 1
    +5],
    );
    
  3. or download this
    =pod comment
                      1         2         3         4         5         6
    ...
    #! fill all the ranges with 1's
    substr($coal, $_->[0], $_->[1] - $_->[0] + 1) = 1 x ($_->[1] - $_->[0]
    + + 1) for @ranges;
    =cut
    
  4. or download this
    
    #! Only need be 60 in this example but excess bytes don't effect the r
    +esults.
    ...
        =       '1' x                  ($range->[HIGH] - $range->[LOW] +1 
    +)
    }
    
  5. or download this
    
    #! Build the new AoA of ranges by scanning the string records starts a
    +nd length of string of 1's
    ...
    
    
    c:\test>