Home »
MCQs »
Perl Programming MCQs
What is the correct syntax for defining a class in Perl?
11. What is the correct syntax for defining a class in Perl?
- package class_name
- class class_name
- new class class_name
- new package class_name
Answer: A) package class_name
Explanation:
The correct syntax for creating a class in Perl is:
package class_name