Guest User

Untitled

a guest
Aug 7th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.35 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. $test = 32611;
  4. $prime = 32609;
  5. $numprimes = 3500;
  6.  
  7. print "Prime $numprimes is $prime\n";
  8.  
  9. until ($numprimes == 10001) {
  10.         if ( (1 x $test) !~ (/^1?$|^(11+?)\1+$/) ) {
  11.                 $prime = $test;
  12.                 $numprimes++;
  13.                 print "Prime $numprimes is $prime\n";
  14.         }
  15.         $test++; $test++;
  16. }
Add Comment
Please, Sign In to add comment