The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
#!/usr/bin/perl

use strict;
use warnings;

sub fact {
    my $n = shift;
    if ($n > 1) {
        return $n * fact($n - 1);
    } else {
        return 1;
    }
}

sub bar {
    print "One\n";
    print "Two\n";
    print "Three\n";

    return;
}

fact(5);
bar();