|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re: Parameters, subs and the shift functionby Abigail-II (Bishop) |
| on Aug 19, 2003 at 07:08 UTC ( [id://284850]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Parameters to a function get flattened to a single list.
If you call a sub as test (3, @a, @b), then
inside test you can't distinguish what came
from @a and what from @b. If you want
to pass entire arrays, you will have to pass references,
and deal with references in the function.
Abigail
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||