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

Re: Problems with zero filling a number.

by thelenm (Vicar)
on Jul 15, 2002 at 18:54 UTC ( [id://181877]=note: print w/replies, xml ) Need Help??


in reply to Problems with zero filling a number.

You'll want to pass $getNumber as a separate argument to printf (or sprintf), like this:
my $getNumber = 213; my $padded = sprintf("%09d", $getNumber);

-- Mike

--
just,my${.02}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-25 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found