ganeshwari has asked for the wisdom of the Perl Monks concerning the following question:
Can we strict the subroutine in perl to receive number of arguments ?
Normally, we can pass any number of arguments and subroutine will have all the passed arguments in @_ variable, from that we can take how many ever arguments we need.
But we need to tell explicitly to the calling place that only limited / number of arguments that we need to pass for the subroutine call.
Is there any way can help it ?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Limit number of Sub routine argument list
by zwon (Abbot) on Oct 25, 2009 at 09:16 UTC | |
Re: Limit number of Sub routine argument list
by afoken (Chancellor) on Oct 25, 2009 at 09:19 UTC | |
Re: Limit number of Sub routine argument list
by almut (Canon) on Oct 25, 2009 at 09:28 UTC | |
by Anonymous Monk on Oct 25, 2009 at 09:42 UTC | |
Re: Limit number of Sub routine argument list
by JavaFan (Canon) on Oct 25, 2009 at 10:57 UTC | |
by ganeshwari (Sexton) on Oct 25, 2009 at 15:26 UTC | |
by ysth (Canon) on Oct 25, 2009 at 18:43 UTC | |
by JavaFan (Canon) on Oct 25, 2009 at 16:32 UTC | |
Re: Limit number of Sub routine argument list
by Anonymous Monk on Oct 25, 2009 at 09:09 UTC |
Back to
Seekers of Perl Wisdom