☰
Debian Codegraph
@
5.42.3-1
5.42.2-3
5.40.1-8
/
/
lib
/
perl5db
/
t
/
fact
☽
☼
lib/perl5db/t/fact
code
plain
raw
GPL-1+
or
Artistic
Perl is Copyright (C) 1987-2025 by Larry Wall and others. All rights reserved.
debian/copyright
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
6
sub fact {
7
my $n = shift;
8
if ($n > 1) {
9
return $n * fact($n - 1);
10
} else {
11
return 1;
12
}
13
}
14
fact(5);