Next The Perl Hardware Store DC.pm Version 30

Highly Recursive Functions

        sub fib {
          my ($n) = @_;
          return $n if $n ==0 || $n == 1;
          return fib($n-2) + fib($n-1);
        }


Next Copyright © 2003 M. J. Dominus