in reply to Returning two lists from a sub

I don't know how to do it without references, I just wanted to add that in Perl 6 you can achieve just that in "slice" context.

So my (@a, @b) = my_sub() will force slice context to my_sub, so if sub my_sub { return @a, @b; } it will not be flattened automatically.

I've just been corrected that my (@a, @b) = my_function() would only fill @a, so the right way to do it would either be binding or my ($a, $b) = slice my_function(), but you can use $a like a real array (and not just an array ref) in Perl 6

You can explicitly enforce slice contect with slice or with @@.

One more reason to look forward to Perl 6 ;-)