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
Explain the different types of data perl can handle.
What happens to objects lost in "unreachable" memory, such as the object returned by Ob->new() in `{ my $ap; $ap = [ Ob->new(), $ap ]; }' ?
What is the purpose of “_file_ literal” and “_line_ literal” in perl?
How to determine strings length in perl?
Explain the arguments for perl interpreter.
Explain goto label?
how to extract pin_code,phone_number,year from text file using regular expressions in perl
what are the steps involved in reading a cgi script on the server?
What is perl pop array function?
What are the various flags/arguments that can be used while executing a perl program?
Explain tk?
What are stdin, stdout and stderr?
What is cpan in perl?
Explain lists ?
Why -w argument is used with perl programs?