RE: Playing with Numbers

2003-11-11 Thread Sethi, Pradeep
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

Re: Playing with Numbers

2003-11-11 Thread Tore Aursand
On Mon, 10 Nov 2003 16:13:43 -0500, SilverFox wrote: > 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? You don't necessarily need to test if a number is x digits. You purely tell Perl to treat it like x d

Re: Playing with Numbers

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 13:13 US/Pacific, SilverFox wrote: 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 there are two parts to your question, the la

RE: Playing with Numbers

2003-11-10 Thread Guay Jean-Sébastien
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 numbe

RE: Playing with Numbers

2003-11-10 Thread LoBue, Mark
> -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

Playing with Numbers

2003-11-10 Thread SilverFox
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]