Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    my $probability = permutation(50, 5);
    ...
        my $count = shift || return 1;
        return $number * permutation($number-1,$count-1);
    }
    
  2. or download this
    sub permutation
    {
         return $_[1] ? $_[0] * permutation($_[0]-1,$_[1]-1) : 1;
    }