This seems to be a bug surprising side-effect of non-strict code to me. First you assign the numbers to both arrays in one go. Then, you use these numbers as (symbolic) references when you by using the arrays as multi-dimensional. Perl then uses the arrays @1, @2 etc. , and these arrays are shared between @PP and QQ.
This is surprising.
Note that using 'strict' would have allowed Perl to tell you that you are implicitly upgrading/changing numbers to references:
Can't use string ("1") as an ARRAY ref while "strict refs in use at .. +.
Update: Updated my explanation to what actually happens, after a conversation with haarg
In reply to Re: Array wierdness
by Corion
in thread Array wierdness
by lgp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |