You can do this in 2 steps (actually 3 lines):
my ($x_ref, $y_ref) = some_sub(\@x1, \@y1);
my @x = @{ $x_ref };
my @y = @{ $y_ref };
The question is: wasn’t it easier to just omit direct arrays and start using links everywhere?
user80168
source
share