in reply to Re^3: How to access directly an element of an array / list returned by a function?
in thread How to access directly an element of an array / list returned by a function?

Your code used the [] markers around your function to create an anonymous array reference, with that the -> dereference was a correct, if scenic, choice.

Tom's solution used () for precedence to help the parser understand that the list returned from the function is what needs slicing. Unfortunately he kept the -> which was incorrect.

  • Comment on Re^4: How to access directly an element of an array / list returned by a function?