summaryrefslogtreecommitdiff
path: root/benchmark/other-lang/fact.pl
blob: 2cef18534cb1529e5a0ce0b0bcd3a67d3e89822a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
sub fact{
  my $n = @_[0];
  if($n < 2){
    return 1;
  }
  else{
    return $n * fact($n-1);
  }
}

for($i=0; $i<10000; $i++){
  &fact(100);
}