Guest User

Untitled

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