Re: general subroutine question



Derek B. Smith wrote:
Why is it so many people on the list are sarcastic???
example from Dani...

I don't spot the sarcasm. I thought Dani was making an effort to
helpfully answer a very vague question. If you don't want people to
notice that you post vague questions, don't post vague questions.

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

Yes, it's called prototyping, but it's a BAD IDEA to use prototypes -
they will kinda sorta do what you want until the inevitable day when
they break your code and burn down your house. Get a copy of Damian
Conway's "Perl Best Practices" (every Perl hack should have one) and
check out pp 194-196 for a somewhat better explanation.

or scalar?

Huh? Pass arguments to a 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 @_?

No.

--
David Filmer (http://DavidFilmer.com)

.