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
How to access parameters passed to a subroutine in perl?
How the interpreter is used in Perl?
What is the function of cgiwrap in cgi programming?
What are the various perl data types based on the context?
What is the difference between perl array and perl hash?
Define dynamic scoping.
What does read () command do?
Does Perl have reference type?
Which has highest precedence in between list and terms? Explain?
Explain the use of 'my' keyword in perl?
Write a cgi program to show the header part?
Write a program that explains the symbolic table clearly.
Explain the internal working of cgi
what is the main function of fork() in cgi programming?
How to connect to SQL server through Perl?