programming-examples/perl/Subroutine/Passing two values to a subroutine.pl

8 lines
120 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
sub addem
{
($value1, $value2) = @_;
return $value1 + $value2;
}
print "2 + 2 = " . addem(2, 2) . "\n";