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

I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur

2031


How to renaming a file in perl programming?

1040


What are the steps involved in configuring a server using cgi programming?

891


When do you use perl programming?

988


Explain the meaning of perl one-liner?

1058


What is Perl?

998


you are required to replace a char in a string and store the number of replacements. How would you do that?

912


Explain the difference between declarations of 'my' and 'local' variable scope in perl?

913


Explain USE and REQUIREMENT statements?

920


What is the purpose of goto expr statement?

907


Explain lists ?

921


What are the advantages and disadvantages of perl language?

914


Comment on the scope of variables in perl.

921


You want to download the contents of a url with perl. How would you do that?

867


How will you open a file in a write-only mode in perl?

945