[Perl-Tracert] Perl question
Arie Abramovitch
ariea at qualcomm.com
Tue Jul 24 05:56:52 PDT 2001
Hi
I have 2 files: my.pl and pub.pm.
The script pub.pm. contains the function pa() definition as follows:
---------------------------------------------------------
sub pa ()
{
pa_profile(0, scalar(@_), \@_);
}
---------------------------------------------------------
The script my.pl calls the function pa() as follows:
---------------------------------------------------------
pa ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
---------------------------------------------------------
The problem:
When I try to run my.pl script, PERL fails with a compilation error:
Too many arguments for pub::pa at my.pl line 25, near "9)"
I moved the definition of pa() to the script my.pl and PERL runs ok.
My question:
Why did PERL complain in the first case?
Why did it stop complaining after placing the function in my.pl?
What should I do to run the pa() function in its original place (in pub.pm)?
Thanks,
Arie Abramovitch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://perl.org.il/pipermail/perl/attachments/20010724/fe3e02fb/attachment.html
More information about the Perl
mailing list