diff options
| author | Niels van Dijke <65567640+PerlBoy1967@users.noreply.github.com> | 2022-05-31 23:12:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-31 23:12:58 +0200 |
| commit | 4e808261c8e5ac01d3cfd87dd8421cde82878534 (patch) | |
| tree | de4ad7010ff59713c8f58ade23a1fc6b07e365bf | |
| parent | 13cf6381fce3a6e1627933ac4b4c430e954e626c (diff) | |
| download | perlweeklychallenge-club-4e808261c8e5ac01d3cfd87dd8421cde82878534.tar.gz perlweeklychallenge-club-4e808261c8e5ac01d3cfd87dd8421cde82878534.tar.bz2 perlweeklychallenge-club-4e808261c8e5ac01d3cfd87dd8421cde82878534.zip | |
Update ch-1.pl
Silly 'length($p)'. Should be simply: $p < 10
| -rwxr-xr-x | challenge-167/perlboy1967/perl/ch-1.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-167/perlboy1967/perl/ch-1.pl b/challenge-167/perlboy1967/perl/ch-1.pl index 4db68779d5..93ae49b9e1 100755 --- a/challenge-167/perlboy1967/perl/ch-1.pl +++ b/challenge-167/perlboy1967/perl/ch-1.pl @@ -41,7 +41,7 @@ sub isCircularPrime ($) { state $circularPrimes = {}; # Below 10 are straight circular primes - if (length($p) == 1) { + if ($p < 10) { $circularPrimes->{$p}++; return 1; } |
