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

Explain what is STDIN, STDOUT and STDERR?

970


Is perl compiler or interpreter?

887


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

897


what is Chop & Chomp function does?

935


How to change a directory in perl?

888


what are the three groups involved in information sharing?

830


Define operators used in perl?

881


What are the arguments and what do they mean in perl programming?

952


Explain subroutine in perl?

853


Explain perl. When do you use perl for programming?

834


How to know whether a key exists or not in perl?

916


What is perl dbi?

844


Can you add two arrays together?

864


Does Perl have reference type?

893


How to merge two arrays in perl?

980