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 |
Explain 'grep' function.
Explain USE and REQUIREMENT statements?
Demonstrate subroutines in perl with a simple example.
Can inheritance be used in perl?
How to access parameters passed to a subroutine in perl?
What is the tk module?
How do you you check the return code of a command in perl?
Explain grooving and shortening of arrays and splicing of arrays?
What purpose does each of the following serve: -w, strict, - T ?
Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?
How to read from a pipeline with Perl
How to find the length of an array in perl?