Which of the following is the correct syntax of a subroutine that makes a positional parameter, say 'right', optional? (Assume the name of the subroutine as example, and left and right as the positional parameters.)
Correct Answer:
sub example ($left, $right = 0) {
return $left + $right;
}
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Perl MCQ Questions