Re: Equal length numbers

2005-12-15 Thread Dr.Ruud
Andrej Kastrin schreef: > Suppose that we have numbers 1 to 1000 and we want all numbers be > equal length; e.g.: > 0001 > 0002 > 0003 > ... > .. > 1000 perl -e "$\=qq(\n); print for (q(0001)..q(1000))" -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Equal length numbers

2005-12-15 Thread Shawn Corey
Andrej Kastrin wrote: Hi all, Suppose that we have numbers 1 to 1000 and we want all numbers be equal length; e.g.: 0001 0002 0003 ... .. 1000 Any idea on how to fix this problem? Best, Andrej # perldoc -f sprintf for ( 1 .. 1000 ){ printf "%04d\n", $_; } # version 2 #!/usr/bin/perl

RE: Equal length numbers

2005-12-15 Thread RICHARD FERNANDEZ
-Original Message- From: Andrej Kastrin [mailto:[EMAIL PROTECTED] Sent: Thursday, December 15, 2005 9:09 AM To: beginners@perl.org Subject: Equal length numbers Hi all, Suppose that we have numbers 1 to 1000 and we want all numbers be equal length; e.g.: 0001 0002 0003 ... .. 1000 Any

Equal length numbers

2005-12-15 Thread Andrej Kastrin
Hi all, Suppose that we have numbers 1 to 1000 and we want all numbers be equal length; e.g.: 0001 0002 0003 ... .. 1000 Any idea on how to fix this problem? Best, Andrej -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]