> Trying to create multiple blank references on one line, like so: > > my($var1 , $var2 , $var3) = ([])x3; > > Ties them together in such a way that doing: > > push($var1,"Foo bar."); > > Will actually push that on to $var2 and $var3 as well. Thanks for your report. That is not a bug. Consider the following code: $a = []; $b = $a; $c = $a; Now we have one array, and three references to that array. This is the same situation that you have created with your example. The 'x' operator does not repeatedly execute code, the way a 'for' loop does. Instead, it copies a value. In this case, the value was a reference to the (single) anonymous array created by the (single) '[]' operator. The reference was duplicated, so that you had three references that all referred to the same array. I hope this explanation clears up your confusion about what was going on here. Thanks again for your report.Thread Previous