programming-examples/perl/Subroutine/Return value from subroutine without using the return statement.pl
2019-11-15 12:59:38 +01:00

8 lines
113 B
Perl

sub addem
{
($value1, $value2) = @_;
$value1 + $value2;
}
print "2 + 2 = " . addem(2, 2) . "\n";