The number that you used is way, way to big. You want to concentrate on the smaller numbers. I used this script with 429496731, and all it does is segfault. Try it with smaller numbers.
#!/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";
}