my $integer = 432;
my $string = sprintf("%05d", $integer);

Yay!

J-S

-----Message d'origine-----
De: SilverFox [mailto:[EMAIL PROTECTED]
Date: 10 novembre, 2003 16:14
À: [EMAIL PROTECTED]
Objet: Playing with Numbers


Hi all, i'm trying to figure out how to test if a number is five digits and 
if not add zero/s in front to make it 5 digits. Any ideas?????

Examples:

444  = 00444
4120 = 04120
23   = 00023

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to