Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: displaying numbers like 001

by Jaap (Curate)
on Jul 17, 2005 at 10:19 UTC ( [id://475550]=note: print w/replies, xml ) Need Help??


in reply to displaying numbers like 001

try (s)printf:
my $number = 3; ### print directly printf ("%03d", $number); ### or assign to a scalar my $string = sprintf ("%03d", $number);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-18 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found