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

Re^2: front-pad a number with zero's

by Anonymous Monk
on Jun 13, 2008 at 08:40 UTC ( [id://691859]=note: print w/replies, xml ) Need Help??


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

You are a genius! Where did you get this sprintf "%0${len}d", $number; It's saved me a lot of troubles. 06-13-2008 Thank you.

Replies are listed 'Best First'.
Re^3: front-pad a number with zero's
by andreas1234567 (Vicar) on Jun 13, 2008 at 09:27 UTC
    Where did you get this sprintf "%0${len}d", $number;
    The sprintf documentation, perhaps?
    printf '<%06s>', 12; # prints "<000012>"
    BTW: The thread you responded to is 7 years old.
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
      I'm replying to a ten year old thread!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-25 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found