use Math::BigInt; my $i = 10000000; while (1) { my $num = Math::BigInt->new('1' . '0' x $i); print $i . "\n"; $i++; }