On Mon, Jun 20, 2005 at 10:44:30AM -0000, Piotr Fusik wrote: > > > + $x = 1 for $[ = 0; > > > + pass('optimized assignment to $[ used to segfault in scalar > context'); > > > + if (($[) = 0) { $x = 1 } > > > + pass('optimized assignment to $[ used to segfault in list > context'); > > > > > > Looks like the descriptions of contexts are swapped (i.e. > "for" should be > > > "list", "if" should be "scalar"). > > > > No, the first assignment is in scalar context and the second (with > > parentheses) is in list context. But the results of the assignments are > > taken in list and scalar contexts, respectively, which I suppose is a > > little confusing. > > I thought "the assignment" is "the = operator". So: > "for $[ = 0" is scalar assignment in list context. > "if (($[) = 0)" is list assignment in scalar context. > Am I wrong?
No, you are correct. I believe Rick was speaking imprecisely, meaning that the first assignment is a scalar assignment and the the second a list assignment.