in reply to Re^2: Empty List miracle(1)
in thread Empty List miracle(1)

So what would be a better phrasing, in your opinion?
Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^4: Empty List miracle(1)
by chromatic (Archbishop) on Apr 30, 2010 at 07:29 UTC

    I don't think there is a good way to explain the default behavior of a list in scalar context, because there are too many ways to create lists in Perl and too many ways to enforce scalar context.

    What does a list do in scalar context provided by scalar assignment?

    What does a list do in scalar context provided by the scalar operator?

    What does a list do in scalar context provided by any other infix operator?

    What does a list do in scalar context provided by the prototype of an operator?

    I might be missing some (hash key?).

      "List" Is a Four-Letter Word Note: there is no such thing as a list in scalar context. When this appears to be the case, the comma operator is put to work.