I want a lojical explanation, not "look up this", "test that". Don't you think it's abysmal when such a fundamental and simple question gets the answer along the lines of "test it"?
The answer is "9".
Sooooo. $rx refers to the _variable_name_ @xxx.
It's not a pointer, not really. It's more like a true C++ reference. In C++, there is a world of difference between
char *a = b;
and
char *&a = b;
On the other hand, when we do $rx = [1,2,3]; it behaves like true pointer.
There is a simple rule in there, just waiting to pop out. I can't quite grasp it. My stream of consciousness follows.
I guess the point would be that in Perl, variables are not names of (pointers to) memory areas, but rather "resizable" and type-safe memory areas themselves. It's like having a virtual machine where the word at a given address can contain arbitrary-size array, or either string or number - no matter. The address (variable name) stays the same.
On the other hand, the "kind" of variable cannot be changed (array, hash, scalar, typeglob(?))
In this context, the difference between [] amd () becomes very interesting... I have a feeling that one of them is a literal, the other an operator. Or something.
OK, I am rambling. But I think that the learned company here is pushing me in the right direction. Thank you.