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 |
What is the importance of perl warnings?
Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?
Explain splicing of arrays?
What are the various advantages and disadvantages of perl?
Explain subroutine in perl?
What are prefix dereferencer? List them.
what is the procedure to define a user define module in your perl application?
What rules must be followed by modules in perl.
Write an expression or perl script to identify the entered ip address is valid or not?
Differentiate between arrays and list in perl.
How to close a directory in perl?
Explain gmtime() function in perl?