in reply to modulus question

What happened when you tried it?

If you are having trouble with the code to implement the test let us see what you've tried and we'll help sort it out for you (the "code" you gave won't work in Perl due to syntax issues).

Perl is the programming world's equivalent of English