Re: general subroutine question
- From: derekbellnersmith@xxxxxxxxx (Derek B. Smith)
- Date: Wed, 30 Aug 2006 11:44:29 -0700 (PDT)
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
#####################################################
Why is it so many people on the list are sarcastic???
example from Dani: "Could you, long time posting
list member, clarify your
question?"
This does not help the situation.
Anyway, I will claify. Is there an inheriant Perl
rule, one that does not require you to code one up,
that disallows a subroutine to pass too may arguments
to another subrountine or scalar?
Likewise, is there a inheriant Perl rule, one that
does not require you to code one up, that disallows a
subroutine to store too many arguments in @_?
If not then yes your example will suffice.
thank you
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
.
- Follow-Ups:
- Re: general subroutine question
- From: usenet
- Re: general subroutine question
- From: D. Bolliger
- Re: general subroutine question
- From: Adriano Ferreira
- Re: general subroutine question
- References:
- Re: general subroutine question
- From: D. Bolliger
- Re: 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
|