programming-examples/perl/Subroutine/shift parameter.pl

10 lines
164 B
Perl
Raw Normal View History

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