Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: displaying numbers like 001

by Adrade (Pilgrim)
on Jul 18, 2005 at 05:54 UTC ( [id://475646]=note: print w/replies, xml ) Need Help??


in reply to displaying numbers like 001

I've had much much happy success using Math::BaseCnv and its simply the easiest thing to use...
use Math::BaseCnv; my $your_number = 55; # cnv( THE-NUMBER, OLD-BASE, NEW-BASE ); my $new_number = cnv( $your_number, 10, 3 ); # $new_number becomes 2001
Hope this helps - good luck,
  -Adam

--
By a scallop's forelocks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://475646]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-04-24 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found