Truncatable primes: Difference between revisions

Line 255:
next if $loop ~~ /0/; # No zeros allowed
my $this = $loop;
my $answer;
while $this.&isprime {
$this.=subst($filter, '');
$answer =return $loop if $this eq '';
}
return $answer and last if $answer;
}
}
Anonymous user