note
extremely
If you don't need to pad then <tt>$count++</tt> works fine.
The trick to this all is that perl's <tt>++</tt> is magical
on some strings. Try these:
<code>
my ($a, $b, $c, $d, $e) = ("aaa", "ab000", "123", "00123", "321ba",);
$a++;
$b++;
$c++;
$d++;
$e++;
print "a=$a\nb=$b\nc=$c\nd=$d\ne=$e\n"
</code>
<p>You'll notice when you run those that <tt>$e</tt> gets
chopped to just numbers. In fact, my stunting isn't really
necessary since perl will happily leave the "00" on the front of <tt>$d</tt>! The only trick to it is never treating $d as a number. Look at this:
<code>
# now that is golfing.
perl -e '$a="0035";until("$a">50){print++$a,$/}'
</code>
<p>Cute huh? Perl is like a squirrel's nest. Good stuff is everywhere but most of it is nuts...
<p>Your code could be re-updated to have quotes around <tt>"$String"</tt> in the comparison for the loop and just have <tt>$String++</tt> where the "magical" part was. Sad that I didn't even know how slick it was. My stunt kept the
comparison from blasting the string but it is better just to
never treat it numerically.
<p><i>-- <br>
$you = new YOU;<br>
honk() if $you->love(perl)</i>
69912
70222