Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Fast - Compact That String

by BrowserUk (Pope)
on Feb 10, 2012 at 20:06 UTC ( #953120=note: print w/replies, xml ) Need Help??

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;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://953120]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-07-16 03:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (330 votes). Check out past polls.

    Notices?