Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Javascript to Perl = fail

by JavaFan (Canon)
on May 04, 2012 at 22:36 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-07-18 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.