in reply to Stupidest Prime Number detector ever!!
for my $each_num (2 .. sqrt $prime_candidate) { if ($prime_candidate % $each_num == 0) { say ... [download]
For another speed-up, skip all the even numbers but 2.