aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoomtrain14 <yet.ebreo@gmail.com>2019-08-22 00:37:57 +0800
committerDoomtrain14 <yet.ebreo@gmail.com>2019-08-22 00:37:57 +0800
commitebcd3041fe5a77b11f05c39c28e9686b562fd0d0 (patch)
treeef0005c2d0bc641e1deeb2a6b66cf50c673198b4
parent465a728659d3009ebcc366c1d46a8cab0e2deb1e (diff)
downloadperlweeklychallenge-club-ebcd3041fe5a77b11f05c39c28e9686b562fd0d0.tar.gz
perlweeklychallenge-club-ebcd3041fe5a77b11f05c39c28e9686b562fd0d0.tar.bz2
perlweeklychallenge-club-ebcd3041fe5a77b11f05c39c28e9686b562fd0d0.zip
Fixed a bug in generating primes
-rw-r--r--challenge-022/yet-ebreo/perl5/ch-1.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-022/yet-ebreo/perl5/ch-1.pl b/challenge-022/yet-ebreo/perl5/ch-1.pl
index fa4f0ca9fd..fbc68cb5fd 100644
--- a/challenge-022/yet-ebreo/perl5/ch-1.pl
+++ b/challenge-022/yet-ebreo/perl5/ch-1.pl
@@ -6,7 +6,7 @@
#This part determines the primes from 0 to 54 using sieve of eratosthenes
#Multiple of each current value (from 0..54) are set to 0 leaving only those
#which are not (Primes)
-@_=grep{@_[ map $x*$_,//..@_/($x=$_) ] =0 if $_[$_] > 1}@_=0..54;
+@_=grep{@_[ map $x*$_,$_..@_/($x=$_) ] =0 if $_[$_] > 1}@_=0..54;
#The ocde below go through the primes generated above and print combinations
#which have difference of +6