Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

The Future of Perl 5

by Laurent_R (Canon)
on Aug 18, 2018 at 13:17 UTC ( [id://1220578]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub fibonacci {
        my $n = shift;
        return 1 if $n == 1 or $n == 0;
        return fibonacci($n-1) + fibonacci($n-2);
    }
    
  2. or download this
    sub fibonacci {
        die "..." unless defined $_[0];
    ...
        die "..." if $n != int $n;
        # ...
    }
    
  3. or download this
    sub fibonacci (PositiveInt $n) {
        return 1 if $n <= 1;
        return fibonacci($n-1) + fibonacci($n-2);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1220578]
Front-paged by Athanasius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found