I would like to return an array from a function in ksh93.
At this point, using the following method, the contents of the array are passed as a single element even though, in the fonction, the array is seen as containing 48 elements.
The fonction is called like so :
In the function I declare a local variable an assign to it the variable name local to the calling script.
Later in the function I try to return the array this way:
What I get as a result, is the content of the array but seen as containing 1 element and not the 48 seen in the function. All the data is present but as one big element.
I use this method with variables containing many elements and it works well.
Is it possible that it cannot work with arrays?
If not I will use a global variable. It will be simpler but it would have been nice to have it work.