Let's see a simple example of passing values to a function.

examples/references/add.pl
#!/usr/bin/perl
use strict;
use warnings;

sub add {
    my ($x, $y) = @_;
    return $x+$y;
}

print add(2, 3), "\n";