programming-examples/perl/Subroutine/shift parameter.pl
2019-11-15 12:59:38 +01:00

10 lines
164 B
Perl

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