How can you create an object of a class in a package?
Answer Posted / vipul dalwala
Say Pachage is My Package
package MyPackage;
sub method() {
}
Then U can create Object
$myobject = new MyPackage();
and u can call any method of object like:
$myobject->method();
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What do you mean by context of a subroutine?
Explain perl.
How to convert arrays into a string in perl?
Which guidelines by Perl modules must be followed?
What is qq (double q)operator in perl?
Explain ivalue in perl?
How many ways can we express string in Perl?
Mention how many ways you can express string in Perl?
Demonstrate subroutines in perl with a simple example.
How do I print the entire contents of an array with Perl?
“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?
Explain the use of 'my' keyword in perl?
How to read a single line from a file in perl?
What is the difference between localtime() and gmtime() functions?
Explain socket programming in perl?