From ebcd3041fe5a77b11f05c39c28e9686b562fd0d0 Mon Sep 17 00:00:00 2001 From: Doomtrain14 Date: Thu, 22 Aug 2019 00:37:57 +0800 Subject: Fixed a bug in generating primes --- challenge-022/yet-ebreo/perl5/ch-1.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit