in reply to return a ref to a return value (array) of another sub
You could either have x return an array ref, or you could have y put the results of x into an array ref
sub x { [my @a = (1, 2, 3)] }; # or sub y { [&x()] } # The & is unnecessary, though
|
|---|