in reply to Re^6: (RFC) Arrays: A Tutorial/Reference
in thread (RFC) Arrays: A Tutorial/Reference

The short version: Parentheses create a list when the context is indeterminant. Always? Sometimes? I don't know, I just have the wwimery1 down pretty well.
$c = ( () = /\w+/g );
This is a special case documented in perlop under Assignment Operators and, I think, perldata documents () as the literal null list. Your description seems correct to me.

() = ("head", "tail"); @ar = ( "head", "tail"); ($head, $tail) = ( "head", "tail" );

Lead us, in notational way, to accepting or expecting the behaviour of

($head) = ( "head", "tail" );
but I don't think I've seen this documented. Here the parenthesis do make a list of the assignment's LHS. It is too easy to think that the LHS of an assignment operation is effected by the enclosing context, when we should realize that the context of an assignment op's LHS is self-determinant. That is the similarity with the repetition operator.

Be well,
Rob


1 Write what it means.