Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have a couple of questions regarding what you are doing. On the following line:
next if ( $last_digit == 5 or $last_digit = 0 ); did you mean: next if ( $last_digit == 5 or $last_digit == 0 );
also to make it run even faster you might want to look to have it only check from $input to sqrt($input). If it does not fail up to the -Enlil In reply to Re: YAPNC: Yet another prime number checker?
by Enlil
|
|