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

There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"

0 Answers   Cisco, Oracle,


What are the different instances used in cgi overhead?

0 Answers  


What are prefix dereferencer?

0 Answers  


What is the use of -t?

0 Answers  


Why does Perl not have overloaded functions?

0 Answers  






What does next statement do in perl?

0 Answers  


Explain the internal working of cgi

0 Answers  


There are some duplicate entries in an array and you want to remove them. How would you do that?

0 Answers  


What is perl push array function?

0 Answers  


What is a chomp() function in perl?

0 Answers  


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

4 Answers   Mind Tree,


What is a hash?

6 Answers   Photon, Satyam, Wipro,


Categories