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
Explain what is STDIN, STDOUT and STDERR?
Is perl compiler or interpreter?
Which functions in perl allows you to include a module file. State their differences.
what is Chop & Chomp function does?
How to change a directory in perl?
what are the three groups involved in information sharing?
Define operators used in perl?
What are the arguments and what do they mean in perl programming?
Explain subroutine in perl?
Explain perl. When do you use perl for programming?
How to know whether a key exists or not in perl?
What is perl dbi?
Can you add two arrays together?
Does Perl have reference type?
How to merge two arrays in perl?