in reply to Printing Arrays in Scalar Context

Is this intentional?

Yes. You discovered the intended, documented behavior. In a list context, an array variable yields all of its elements. In scalar context, an array variable yields its length.

But I think you understood that. The question, then, is: Why is an array variable given as an argument to print seen as being in list context, and why is an array variable given to the "dot" operator seen as being in scalar context?

Answer: all arguments to print are given list context. And the "dot" operator is a string operator, which means it's a scalar operator, which means it forces scalar context on both of its arguments.

The last piece of the puzzle is that the "dot" operator has higher precedence than the print "argument listification operator".

is there a way to "cast" @x to be an array and not be forced into scalar context when its being concatenated?

The solution is to not try to "concatenate" the array. As far as I can tell, you don't need to; just use a comma instead of a dot.

You should never use "dot" unless your specific intent is to create a new string which is a join of two other strings.

The arguments to print are usually joined with '' (a zero-length string). More precisely, they are always joined with the current value of $,, and the default value of this variable is ''.

We're building the house of the future together.