I think you mean to return (@a1,@a2); in f(). As it is, you're taking references to them before passing back the list.
A side note, the line where you call f() will leave the global @a2 empty. Arrays in multiple assignment are greedy.
After Compline,
Zaxo
In reply to Re: Help with references
by Zaxo
in thread Help with references
by coldmiser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |