Math::Base36(3pm)

πŸ’– Math::Base36 β€” the manual page, but make it cute πŸ’–

okay so bestie, you found the docs for Math::Base36, which lives in the User Contributed Perl Documentation section of the manual (that's the (3pm) part, iykyk). it does exactly one thing and it does it flawlessly: base36 strings, in and out. let's get into it πŸ¦‹


✨ NAME ✨

Math::Base36 β€” encoding and decoding of base36 strings. that's it. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

here's the look, the whole look:

use Math::Base36 ':all';

$b36 = encode_base36( $number, $padlength );
$number = decode_base36( $b36 );

yes, ':all'. yes, it just hands you the functions. iconic behavior, no notes. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

this module converts to and from Base36 numbers, and the range is literally 0..9 - A..Z. so digits for the small stuff, letters for the big stuff. classic.

and the origin story?? it was created because of an article/challenge in "The Perl Review". not me getting emotional over a module's lore 😭 main character energy fr fr.


🌈 METHODS 🌈

encode_base36( $number, [$padlength] )

accepts a unsigned int and hands back a Base36 string representation of that number. and if you feel like it, you can optionally zero-pad it out to $padlength. that's the optional one in the brackets, in case the syntax was being shy. ✨

decode_base36( $b36 )

takes a base36 string and returns a Base10 string representation of the number. give it letters, get back numbers. the glow-up is real. πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Rune Henssel <perl@henssel.dk>

🧚 MAINTAINER 🧚

Brian Cassidy <bricas@cpan.org>


Copyright 2002 by Rune Henssel

Copyright 2007-2015 by Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

legal bit, but make it sparkly: this is free software, bestie. redistribute it, modify it, go off β€” just keep it under the same terms as Perl itself. periodt. πŸ’–

and that's the page, start to finish, no cap. this doc was set in type by perl v5.36.0, dated 2022-10-22, and honestly? she ate. πŸ“ bye bestie, go encode something 🌟

πŸ“¦ where this page comes from