Re: general subroutine question
- From: info@xxxxxxxxxxxx (D. Bolliger)
- Date: Wed, 30 Aug 2006 20:26:33 +0200
Derek B. Smith am Mittwoch, 30. August 2006 19:56:
All,
Is there a commonly known way or method to limit the
number of arguments that a subroutine can
store
store where?
or pass?
pass to what?
Did you mean: Is there a way for a subroutine to react to a call with to many
arguments?
sub accept_max_5_arguments {
die 'too many arguments!' if @_ > 5;
}
sub accept_max_x_arguments { # apart from the first
my $maxargs=shift;
die 'too many arguments!' if @_ > $maxargs;
}
If this does not help: Could you, long time posting list member, clarify your
question?
Dani
.
- Follow-Ups:
- Re: general subroutine question
- From: Derek B. Smith
- Re: general subroutine question
- References:
- general subroutine question
- From: Derek B. Smith
- general subroutine question
- Prev by Date: Re: general subroutine question
- Next by Date: Re: general subroutine question
- Previous by thread: Re: general subroutine question
- Next by thread: Re: general subroutine question
- Index(es):
Relevant Pages
|