sub addem { $value1 = shift @_; if ($#_ > 0) { $value2 = @_[1]; } else { $value2 = 1; } print "$value1 + $value2 = " . ($value1 + $value2); } addem(2);