more useful options | |
PerlMonks |
Re^5: Distinguish between missing and undefined arguments with subroutine signatures (slurpy parameter)by LanX (Saint) |
on Dec 27, 2020 at 21:04 UTC ( [id://11125828]=note: print w/replies, xml ) | Need Help?? |
> To my understanding it is needed for an optional value argument in a signature. Ah ... I see. Using a slurpy parameter @settings will solve this and fits much better into your use-case. from perlsub
After positional parameters, additional arguments may be captured in a slurpy parameter. The simplest form of this is just an array variable:
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|