in the case of storing the return values in arrays from function calls we must always use the array variable at the end as the return concatenates the array and sends it so it gets stored in the single array @a,
To get over it the best way would be reference and the optimal way as pass by value and pass by reference