15 lines
258 B
Perl
15 lines
258 B
Perl
sub addem
|
|
{
|
|
my %hash =
|
|
(
|
|
OPERAND1 => 2,
|
|
OPERAND2 => 3,
|
|
@_,
|
|
);
|
|
|
|
return $hash{OPERAND1} + $hash{OPERAND2};
|
|
}
|
|
|
|
print "The result is: " . addem();
|
|
print "\n";
|
|
print "The result is: " . addem(OPERAND1 => 3); |