# find sum of first 100 digits my $sum = 0; for my $i (0 .. 99) { $sum += $i; }