On Sat, Apr 19, 2008 at 1:03 PM, Rob Dixon <[EMAIL PROTECTED]> wrote: snip > foreach my $i (1 .. 9999) { > my $zfill = substr("0000$i", -4); > my $longer = "dbt${zfill}dsfg"; > print $longer, "\n"; > } > > Rob snip
TIMTOWTDI fight! for my $i (1 .. 9999) { my $longer = "0" x (4 - length $i) . $i; print "$longer\n"; } -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/