Chj::BinHexOctDec
use Chj::BinHexOctDec; my $num = Chj::BinHexOctDec->bin("1001010010"); is ref($num), "Chj::BinHexOctDec"; is $num->dec, 594; use FP::Equal 'is_equal'; is_equal [ map { $num->$_ } qw(dec bin hex oct) ], [ 594, "1001010010", "252", "1122" ];
Conversions between number bases.
The methods are overloaded both as class methods (to convert *from* that base) and object method (*to* that base).
Note: does not die on invalid input. (Should this be considered a bug?)
This is alpha software! Read the status section in the package README or on the website.
To install FunctionalPerl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FunctionalPerl
CPAN shell
perl -MCPAN -e shell install FunctionalPerl
For more information on module installation, please visit the detailed CPAN module installation guide.