gt (see Relational Operators in perlop) is a string (lexicographic/asciibetic) comparison, and '100000' or even '1000000000' is lexicographically less than '99999' or even '9'. Use a numeric comparison:
Update: Oops... See Athanasius below. But this works:
c:\@Work\Perl\monks>perl -wMstrict -le "my $s = '01'; ;; for (0 .. 105) { print qq{'$s'}; $s++; $s = '01' if do { (my $t = $s) > 99 }; } " '01' '02' '03' '04' '05' '06' ... '97' '98' '99' '01' '02' '03' '04' '05' '06' '07'
Give a man a fish: <%-{-{-{-<
In reply to Re^4: POE - can't increment within sub
by AnomalousMonk
in thread POE - can't increment within sub
by ljamison
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |