in reply to Re^12: chopping a string into slices - is there a more elegant way to do it?
in thread chopping a string into slices - is there a more elegant way to do it?

List assignment is chosen because "()" on the LHS of "=" is special-cased to become a list assignment in that situation. The list is formed as a result of the list assignment being chosen, and gets created even if no parens are present.

  • Comment on Re^13: chopping a string into slices - is there a more elegant way to do it?

Replies are listed 'Best First'.
List assignment vs. scalar assignment.
by gwadej (Chaplain) on Dec 01, 2008 at 02:52 UTC

    Exactly. But, the choice of list assignment is happening at compile time and therefore is independent of context.

    You have been saying this without my understanding because I was missing when the list assignment was chosen instead of scalar assignment.

    Like most important points, yours is immediately obvious once I understood my invalid assumption.

    As I said, this has been a most enlightening discussion. Thank you.

    G. Wade