I'm not aware of different types of lists having varying behavior in scalar context. Are there some examples?

My original response was based on the documentation in perldata - "If you evaluate a named array in a scalar context, it returns the length of an array. (Note that this is not true of lists, which return the last value, like the C comma operator, nor of built-in functions, which return whatever they feel like returning.)"


In reply to Re: (tye)Re2: List context or not? by buckaduck
in thread List context or not? by sguazt

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":