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 does cgi program store?
Which functions in Perl allows you to include a module file or a module and what is the difference between them?
You want to print the contents of an entire array. How would you do that?
What are perl variables?
How to convert strings into an array in perl?
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
Define dynamic scoping.
How to dereference a reference?
What are scalar data and scalar variables?
What are numeric operators in perl?
What does next statement do in perl?
Differences between die and exit.
What are the various flags/arguments that can be used while executing a perl program?
Why is it hard to call this function: sub y { "because" } ?
what are steps to do to lock the sony ericsson mobile with password?