Hi , i hope this would help you out @array = (1,2,3,40,51);
foreach $line (@array){ if($line > 9 ){ $add = "0";}else{ $add = "00";} print $add$line,"<br>";} bye On Wed, 16 Feb 2005 13:28:11 +0100, Bastian Angerstein <[EMAIL PROTECTED]> wrote: > > Hello, > > I have some Numbers 1 2 3 40 51 and I want them to be in the format > 001 002 003 ... 040 ... 051 ... > > What is the fastest way to do this?? > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>