Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Javascript to Perl = fail

by JavaFan (Canon)
on May 04, 2012 at 22:36 UTC ( #968999=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub isprime($) {
        my $num = $_[1];
    ...
        }
        return $primer;
    }
    
  2. or download this
    sub isprime {$_[0] =~ /^[2357]$/}
    
  3. or download this
    if (($n != 1) && ($n != 0)) {
       if (isprime($n)) {
    ...
          $comp += $n;
       }
    }
    
  4. or download this
    if ($n =~ /^[2357]$/) {
        $prime += $n;
    ...
    elsif ($n !~ /^[01]$/) {
        $comp += $n;
    }
    
  5. or download this
    $text.length
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://968999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-03-26 11:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?