in reply to Re^2: Why does assignment change the result?
in thread Why does assignment change the result?

To paraphrase what demerphq said :

Similarly, your "two_easy" sub returns a LIST. (Because you picked out elements of the array, using an array slice).

In a scalar context, a list evaluates to the last element.

For now, you can ignore the "tied" comment.

Update: jdporter is apparently a faster typist than I am. His post essentially says the same thing.

     "An undefined problem has an infinite number of solutions." - Robert A. Humphrey         "If you're not part of the solution, you're part of the precipitate." - Henry J. Tillman

  • Comment on Re^3: Why does assignment change the result?