adspace
package MYCALC;
use Exporter;
our @EXPORT = ();
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(addition multi);
our %EXPORT_TAGS = (DEFAULT => [qw(&addition)],Both =>
[qw(&addition &
+multi)]);
sub addition {
return $_[0] + $_[1];
}
sub multi {
return $_[0] * $_[1];
}
1;
Program:
use strict;
use warnings;
my @list = qw (2 2);
use Module qw(:DEFAULT);
print addition(@list),"\n";
Above coding is my module MYCALC and the program which using
this module, I have not exported any function using @EXPORT,
but I have used the DEFAULT in %EXPORT_TAGS with the
function addition, when I call this function from the main
it says the error as,
Answer Posted / Roopesh Gangwar
Reserve refers to the portion of a company's oil, gas, or mineral resources that has been discovered and can be extracted with existing technology and under current economic conditions. Provision, on the other hand, refers to an estimate or forecast of potentially recoverable resources based on geological studies and engineering analysis, but not yet officially classified as reserves.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to connect to SQL server through Perl?
There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"
How do find the length of an array?
What is perl? What is the basic command to print a string in perl?