Home »
MCQs »
Perl Programming MCQs
What is the correct syntax for creating a new object in Perl?
14. What is the correct syntax for creating a new object in Perl?
- var object_name = new class_name()
- new object_name = class_name()
- my object_name = new class_name()
- None of these
Answer: C) my object_name = new class_name()
Explanation:
The correct syntax for creating an object in Perl is:
my object_name = new class_name()