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 is warn function in perl?

1022


Which functions in perl allows you to include a module file.

1105


Explain the meaning of subroutine?

1018


Explain about typeglobs?

997


Create a function that is only available inside the scope where it is defined ?

1055


What is the function of virtual documents in cgi programs?

1013


How to open and read data files with Perl

1092


Explain split function in perl?

1042


How do you you check the return code of a command in perl?

1034


How the interpreter is used in Perl?

992


Write syntax to use grep function?

1018


What happens when you return a reference to a private variable?

1061


Enlist the advantages of using c over perl?

967


What is the difference between use and require in perl programming?

986


How can you create anonymous subroutines?

965