Hi!
It's easy!
There is one sample:
sub do_somethig {
my @[EMAIL PROTECTED];
if (! ($passed_params[0])) { print "Not passed parametrs" }
my @lines;
#Do something ...
return @lines;
}
On Thu, 25 Sep 2003 21:59:53 -0700, Rajesh Dorairajan
<[EMAIL PROTECTED]>
> Can someone explain how does one pass
> a parameter to a Perl Module?
There are a few ways.
#1 - On the use line
use My::Module qw(foo bar);
When you "use" a module it first loads the module and evaluates it. Second
it runs the import() subroutine in the module (if there is one), passing the
Rajesh Dorairajan wrote:
Can someone explain how does one pass a parameter to a Perl Module? To
illustrate suppose I've My::Module
package My::Module;
BEGIN
{
$scalar = $input;
}
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = ($scalar);
In the above script is there anyway to pass the $inpu