The stupid question is the question not asked | |
PerlMonks |
Zero padding numbers (was: Ok, here's an easy one)by glickjd (Novice) |
on Sep 08, 2002 at 17:39 UTC ( [id://196055]=perlquestion: print w/replies, xml ) | 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? Thanks Jeremy edited: Mon Sep 9 00:22:18 2002 by jeffa - title change
Back to
Seekers of Perl Wisdom
|
|