Gufranul, Why not just use sprintf()? That should be much easier than doing it yourself.
perldoc -f sprintf -------------------------- David Olbersen iGuard Engineer 11415 West Bernardo Court San Diego, CA 92127 1-858-676-2277 x2152 > -----Original Message----- > From: Gufranul Haque [mailto:[EMAIL PROTECTED] > Sent: Friday, March 21, 2003 2:50 PM > To: [EMAIL PROTECTED] > Subject: calculating length of a number > > > Hello all, > > I have a series of numbers 20.45,-2.00,45.450,-30.390 > > 20.45 - length is 5 > -2.00 - length is 4 > > I need to calculate the length of each number for formatting purposes. > > I am trying to split the each number into an array of > charcters and then calculating the length of the array > > my @digits = split(/\S/, @number[$i]) > my @length = @digits > > but somehow it doesn't seem to be working. Can someone tell > me the corect expression to use, > > Thanks > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]