what is the procedure to define a user define module in your
perl application?
Answers were Sorted based on User's Feedback
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 |
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 |
How can you call a subroutine and identify a subroutine?
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?
Explain chop?
How to merge two arrays in perl?
Enlist the advantages of using c over perl?
How to concatenate strings with perl?
How many ways can we express string in Perl?
How do I print the entire contents of an array with Perl?
What is the Common Gateway Interface?
what is the difference between java and cgi?
What does the qx{ } operator do?
How to renaming a file in perl programming?