All~ > >It does on reading. I forget the eloquent explanation about the how or > >why, but all references bar the leftmost are vivified. (Even inside > >defined). In effect, all bar the last reference are in lvalue context - > >only the rightmost is rvalue. > > The explanation is the part that would have been the most interesting... > Everyone: Is this just some unwanted but unavoidable behaviour that > results from the lvalue/rvalue processing or is there a real reason > behind it? (I don't see one, that's why I ask :-)
I am not entirely certain for Perl, but in C the [ ] operator dereferences a pointer, and can be assigned to so the [ ] operator yields a possible lvalue. If the resultant value is then dereferneced with another [ ] operator you have just used the first value in an lvalue context... Thus each but the last [ ] force lvalue context, and the final one waits to see its own context... Matt PS-Appologies to Haegl for accidentally replying to him alone at first....