Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What do you mean by context of a subroutine?

938


Explain perl.

905


How to convert arrays into a string in perl?

896


Which guidelines by Perl modules must be followed?

970


What is qq (double q)operator in perl?

978


Explain ivalue in perl?

917


How many ways can we express string in Perl?

911


Mention how many ways you can express string in Perl?

982


Demonstrate subroutines in perl with a simple example.

826


How do I print the entire contents of an array with Perl?

913


“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?

965


Explain the use of 'my' keyword in perl?

975


How to read a single line from a file in perl?

933


What is the difference between localtime() and gmtime() functions?

976


Explain socket programming in perl?

873