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
What do you mean by context of a subroutine?
How many types of primary data structures in Perl and what do they mean?
Comment on array slicing and range operator
Explain what is lvalue?
Comment on data types and variables in perl.
How do find the length of an array?
How will you open a file in read-only mode in perl?
what is Perl one liner?
what is Polymorphism in Perl?
What does localtime() do in perl?
Why to use perl scripting?
How many data types are there in perl?
Is perl compiler or interpreter?
What are the functions that can be performed using cgi program?
Why -w argument is used with perl programs?