Is there off-the-shelf open source software for generating serial numbers of user-definable number bases?
Preferably in Perl, or similar scripting language.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at Integer::Tiny. It allows you to specify an arbitrarily-sized string of single-character “digits”, then converts integers into that set. Give it a string of length n and the number is effectively converted into base n (although it won’t look like a normal base n representation unless that string orders the digits normally, of course).
Edit: Here’s the one-liner base-10 solution from Sorpigal’s comment redone in base-3: