Help for this page

Select Code to Download


  1. or download this
    sub isPrime($) {
        $n=pop;
        1^(1x$n--)=~/^(1{2,$n})\1+$/;
    }
    
  2. or download this
    sub isPrime($) {
       (1x pop)!~/^(11+)\1+$/
    }