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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / subina

Package Module_name;
require Exporter;
@ISA = qw(list of base classes);
@Export = qw(list of symbols );

#------------code---------------------



#at the end of module

1;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

what are prefix dereferencer and list them out?

0 Answers  


Explain perl.

0 Answers  


How do you set environment variables in perl?

0 Answers  


You want to read command-line arguements with perl. How would you do that?

0 Answers  


What purpose does each of the following serve: -w, strict, - T ?

2 Answers  


Can any1 tell me 2 write the script using perl script 2 looking at a log file 2 see wheather the test has passed or not.

3 Answers   TCS,


How to close a directory in perl?

0 Answers  


What does delete function do in perl?

0 Answers  


How to find out the version of PERL being installed on your LINUX machine.

4 Answers   Mind Tree,


what is CPAN?

0 Answers  


What is eval function in perl?

0 Answers  


What is the purpose of “_file_ literal” and “_line_ literal” in perl?

0 Answers  


Categories