in reply to Stupidest Prime Number detector ever!!

If a candidate is not a prime, it must have a divisor that's less than the square root of the candidate (proof left as an exercise to the reader).
for my $each_num (2 .. sqrt $prime_candidate) { if ($prime_candidate % $each_num == 0) { say ...

For another speed-up, skip all the even numbers but 2.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]