How about

my $formatted = sprintf("%05d", $number); 




-----Original Message-----
From: SilverFox [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2003 1:14 PM
To: [EMAIL PROTECTED]
Subject: 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