aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-139/james-smith/perl/ch-2.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-139/james-smith/perl/ch-2.pl b/challenge-139/james-smith/perl/ch-2.pl
index cd0c2c56ca..c828aefea7 100644
--- a/challenge-139/james-smith/perl/ch-2.pl
+++ b/challenge-139/james-smith/perl/ch-2.pl
@@ -16,6 +16,6 @@ say $_ for @long_primes;
sub rec_len {
my( $D, $N, $s ) = ( shift, 1, '' );
- $s.=int($N/$D),$N%=$D,$N.=0 for 0..2*$D;
+ $s.=int($N/$D),$N%=$D,$N.=0 for 0..2*$D+length $D;
$s =~ /(.+?)\1+$/ ? length $1 : 0;
}