Yeps, use the printf function, something like this: $ perl -e 'printf("%04d\n", 1);' 0001
JeeBee. On Thu, 15 Dec 2005 14:42:46 +0100, Andrej Kastrin wrote: > Hi all, > > Suppose that we have numbers 1 to 1000 and we want all numbers be equal > lengh; e.g.: > 0001 > 0002 > 0003 > ... > .. > 1000 > > Any ideaa on how to fix this problem? > > Best, Andrej -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>