glickjd has asked for the wisdom of the Perl Monks concerning the following question:
I want to make sure my number is always two digits.
my $num = 5;
What's the easiest way to make $num = 05 instead of 5? Can I do this with sprintf?
Thanks
Jeremy
edited: Mon Sep 9 00:22:18 2002 by jeffa - title change
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Ok, here's an easy one
by Aristotle (Chancellor) on Sep 08, 2002 at 17:44 UTC | |
Re: Ok, here's an easy one
by blakem (Monsignor) on Sep 08, 2002 at 17:44 UTC | |
Re: Ok, here's an easy one
by abitkin (Monk) on Sep 08, 2002 at 19:53 UTC | |
by I0 (Priest) on Sep 09, 2002 at 03:13 UTC | |
Re: Ok, here's an easy one
by Zaxo (Archbishop) on Sep 08, 2002 at 17:45 UTC | |
Re: Ok, here's an easy one
by glickjd (Novice) on Sep 08, 2002 at 17:46 UTC | |
Re: Zero padding numbers (was: Ok, here's an easy one)
by The_Rev (Acolyte) on Sep 09, 2002 at 13:07 UTC |
Back to
Seekers of Perl Wisdom