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

List the operator used in Perl?

0 Answers  


How to start perl in interactive mode?

0 Answers  


What is the importance of perl warnings? How do you turn them on?

0 Answers  


Explain a tell function in perl?

0 Answers  


Explain the meaning of subroutine?

0 Answers  






what is the difference between java and cgi?

0 Answers  


What is Perl?

0 Answers  


What can be done for efficient parameter passing in perl? Explain.

0 Answers  


Explain grooving and shortening of arrays and splicing of arrays?

0 Answers  


what is Polymorphism in Perl?

0 Answers  


What does the qq{ } operator do?

0 Answers  


What is qq (double q)operator in perl?

0 Answers  


Categories