Perl

Perl

Installation

Ubuntu
apt install perl
AlmaLinux
dnf install perl

Examples

Fibonacci Numbers
# Fibonacci Numbers
sub fib
{
    my $n = $_[0];
    if ($n < 2) {
        return $n;
    } else {
        return fib( $n - 2 ) + fib( $n - 1 );
    }
}

print fib($ARGV[0]);

=pod
example
    perl fib.pl 39
=cut