The @ar array greedily slurps all the data from the right value array (@_). To fix it, you can either reverse the order passed, or use references.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re: passing array as an argument
by hardburn
in thread passing array as an argument
by podian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |