You should really read perlsub. Perl prototypes do not work as you expect.
In Perl, you do not check for the correct number and count of arguments at compile time, but at run time. The minimal solution for exactly two arguments is:
sub f # *NO* prototype! { @_==2 or die "f needs two arguments"; # ... }
Alexander
In reply to Re: passing array of args to prototyped subs
by afoken
in thread passing array of args to prototyped subs
by pldanutz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |