|Keep It Simple, Stupid|
Zero padding numbers (was: Ok, here's an easy one)by glickjd (Novice)
|on Sep 08, 2002 at 17:39 UTC||Need Help??|
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?
edited: Mon Sep 9 00:22:18 2002 by jeffa - title change