Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Help with number conversion

by gav^ (Curate)
on Apr 03, 2002 at 05:28 UTC ( [id://156239]=note: print w/replies, xml ) Need Help??


in reply to Help with number conversion

sprintf is your friend.

You want:

$fixed = sprintf('%03d', $num);
Hope this helps...

gav^

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found