If you're using a Perl of version 5.20 or newer, you can use subroutine signatures. Perl 5.36.0 removed the experimental tag, so use v5.36; will enable them.
See this Effective Perl Programming article about signatures for more details.
Improve your skills with Modern Perl: the free book.
In reply to Re: Too many arguments for subroutine
by chromatic
in thread Too many arguments for subroutine
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |