Instead of returning the arrays themselves, you could return references. e.g. return ([@a1],[@a2]); (BUT NOT: return (\@a1, \@a2);) Of course, then you need to be expecting references returned from the function.
I prefer to call the function in void context (i.e. don't expect anything to be returned from it) and pass in references to the arrays you want to assign to as parameters and then have the function fill them in for you, but this is a matter of style I guess.
Edit by BazB: add code tags and formatting.
In reply to Re^2: Help with references
by Anonymous Monk
in thread Help with references
by coldmiser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |