in reply to Can't call method "forprimes"

You need to import the subroutine

use ntheory qw( forprimes );

But even then you're using it wrong. The syntax is
forprimes { say } 100,200; # print primes from 100 to 200 forprimes { say } 100; # print primes from 0 to 100


holli

You can lead your users to water, but alas, you cannot drown them.