I would like to return 3 arrays from a subroutine. And automatically assign it to 3 arrays when calling the subroutine.
e.g
sub foo {
....
....
return 3 arrays @a1 @a2 @a3
}
then I should be able to do something like
my (@array1, @array2, @array3) = foo();
and @array1 should contain @a1, @array2 contains @a2 and so on.