Update: fixed typo#!/usr/bin/perl use strict; use warnings; use Math::Prime::XS qw(is_prime); my $prime = shift @ARGV; if (is_prime($prime)) { print "prime", "\n"; } else { print "not prime", "\n"; }
In reply to Re: is_a_prime test?
by Khen1950fx
in thread is_a_prime test?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |