in reply to Re^2: acme::tools num2code function
in thread acme::tools num2code function

I've learned something new today

Along the same line of thought, you may be interested in Math::BaseCnv

#!/usr/bin/perl use warnings; use strict; use Math::BaseCnv; #fast # Convert 63 from base-10 (decimal) to base-2 (binary) # $binary_63 = cnv( 63, 10, 2 ); my $time = time; print "time -> $time\n"; my $time_128 = cnv( $time, 10, 128 ); print "time_128 -> $time_128\n"; #this will sometimes print hidden newlines my $time_10 = cnv( $time_128, 128, 10 ); print "time_10 -> $time_10\n"; my $time_64 = cnv( $time, 10, 64 ); print "time_64 -> $time_64\n"; my $time_b64 = cnv( $time, 10, 'b64' ); print "time_b64 -> $time_b64\n"; exit;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: acme::tools num2code function
by cztmonk (Monk) on Jun 11, 2012 at 10:34 UTC
    Thanks for this hint.