Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: front-pad a number with zero's

by lhoward (Vicar)
on Oct 30, 2001 at 23:27 UTC ( #122170=note: print w/replies, xml ) Need Help??


in reply to front-pad a number with zero's

You can do the same thing with sprintf.
my $f=sprintf("%05d",123);
will put "00123" into $f.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2019-08-24 18:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?