Home »
MCQs »
Perl Programming MCQs
Which of these is a valid way to define a function in Perl?
56. Which of these is a valid way to define a function in Perl?
- returntype function_name{
}
- sub function_name{
}
- function function_name{
}
- None of these
Answer: B)
sub function_name{
}
Explanation:
The valid method to define a function in Perl,
sub function_name{
}