

o  new Math::BaseCalc 
o 
new Math::BaseCalc(digits=>...)
Create a new base calculator. You may specify the digit set to use, by either giving the digits in a list reference (in increasing order, with the ’zero’ character first in the list) or by specifying the name of one of the predefined digit sets (see the digit() method below). If your digit set includes the character , then a dash at the beginning of a number will no longer signify a negative number. 
o 
$calc>to_base(NUMBER)
Converts a number to a string representing that number in the associated base. If NUMBER is a Math::BigInt object, to_base() will still work fine and give you an exact result string. 
o 
$calc>from_base(STRING)
Converts a string representing a number in the associated base to a Perl integer. The behavior when fed strings with characters not in $calc’s digit set is currently undefined. If STRING converts to a number too large for perl’s integer representation, beware that the result may be autoconverted to a floatingpoint representation and thus only be an approximation. 
o  $calc>digits 
o 
$calc>digits(...)
Get/set the current digit set of the calculator. With no arguments, simply returns a list of the characters that make up the current digit set. To change the current digit set, pass a list reference containing the new digits, or the name of a predefined digit set. Currently the predefined digit sets are:
bin => [0,1], hex => [0..9,a..f], HEX => [0..9,A..F], oct => [0..7], 64 => [A..Z,a..z,0..9,+,/], 62 => [0..9,a..z,A..Z], Examples: $calc>digits(bin); $calc>digits([0..7]); $calc>digits([qw(w a l d o)]); If any of your digits has more than one character, the behavior is currently undefined. 
The ’64’ digit set is meant to be useful for Base64 encoding. I took it from the MIME::Base64.pm module. Does it look right? It’s sure in a strange order.
Ken Williams, ken@forum.swarthmore.edu
This is free software in the colloquial niceguy sense of the word. Copyright (c) 1999, Ken Williams. You may redistribute and/or modify it under the same terms as Perl itself.
perl(1).
perl v5.20.3  MATH::BASECALC (3)  20130608 
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.