Chas. Owens wrote:
> 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";
> }

You're on!

foreach my $i (1 .. 9999) {
  (my $longer = $i + 10000) =~ s/1(....)$/dbt$1dsfg/;
  print $longer, "\n";
}

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to