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...

what is the procedure to define a user define module in your
perl application?

Answer Posted / nachikethas

Create a .pm file eg xyz.pm and you can have subroutines or
what ever you want can be placed there.

#content of xyz.pm
package xyz;
sub Printit{
print "In module xyz...";
}
1;
#end of xyz.pm

for using this perl module in ur perl program eg abc.pl

# content of abc.pl

use xyz;
xyz->Printit();

#end pf abc.pl

hope this helps :)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to access parameters passed to a subroutine in perl?

958


How the interpreter is used in Perl?

951


What is the function of cgiwrap in cgi programming?

925


What are the various perl data types based on the context?

939


What is the difference between perl array and perl hash?

1087


Define dynamic scoping.

897


What does read () command do?

938


Does Perl have reference type?

940


Which has highest precedence in between list and terms? Explain?

867


Explain the use of 'my' keyword in perl?

1022


Write a cgi program to show the header part?

984


Write a program that explains the symbolic table clearly.

956


Explain the internal working of cgi

927


what is the main function of fork() in cgi programming?

1135


How to connect to SQL server through Perl?

1056