Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: incrementing mixed letters and numbers

by shmem (Chancellor)
on Aug 22, 2017 at 08:36 UTC ( #1197790=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash;
    my @chars     = (0..9,'A'..'Z','a'..'z',map{chr$_}32..47,58..64,91..96
    +);
    ...
        $num = $num * $base + $hash{$_} for $str =~ /./g;
        $num;
    }
    
  2. or download this
    my $number = decode_base 36, 1009;
    say lc encode_base 36, $number++ for 0..36;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1197790]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-08-22 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (204 votes). Check out past polls.

    Notices?