That's illuminating. Thanks!
Still, there are questions.
A "list literal" aka "use of the comma operator, usually between parens", evaluates all but the last expression in void context and then evaluates the last expression in scalar context and returns the resulting scalar.
The second code block in Re^4: Evil Interview Questions (memes) has what I think is the scenario you describe, but at no point does any item in the list have a different context from any other item. Can you demonstrate the behavior you describe here?
Any number of ways of producing a list of scalar values (which is the "list" that an array contains) can have any number of different behaviors in a scalar context.
Can you expand on this? I'm not sure what you mean by "ways of producing a list of scalar values" or what the "any number of different behaviors" would be.
Thanks again for your remarks.
In reply to Re^6: Evil Interview Questions (memes)
by kyle
in thread Evil Interview Questions
by kyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |