use strict; use warnings; my $i = 100000000; my $num = '9' x $i; $num++; print length ($num) . ' ' . substr $num, 0, 10;