in reply to Re^2: 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?

Sorry, could have sworn I tried that first. Many thanks!!
  • Comment on Re^3: How to access directly an element of an array / list returned by a function?

Replies are listed 'Best First'.
Re^4: How to access directly an element of an array / list returned by a function?
by Anonymous Monk on Aug 26, 2010 at 19:04 UTC
    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.