Help for this page

Select Code to Download


  1. or download this
    ## Map the numbers, 0 .. 36 to the symbols we use 
    ## to represent the number in base37
    ...
        ## return the accumulated value.
        $n;
    }
    
  2. or download this
    my @c1 = (' ', '0'..'9', 'A'..'Z' );
    sub fromB37 {
    ...
        $n = $n * 37 + $c2[$_] for unpack 'C*', $_[0];
        $n;
    }