Fundamentals5 / 5
Up next

Subroutines

use strict;
use warnings;
use feature 'say';

# a sub unpacks its arguments from @_
sub add {
    my ($a, $b) = @_;
    return $a + $b;
}

say add(2, 3);
What you're solving

arguments arrive in @_