On Thu Aug 09 06:58:20 2001, mjd@plover.com wrote: > > ----------------------------------------------------------------- > [Please enter your report here] > > > > $x = 'abcd'; > > for (($x =~ /./g) x 2) { > print chop; > } > > This prints "abcd". I expected it to print "abcdabcd". Apparently, > when I chop the first item in the list, it also chops the fifth item. > I was not expecting this aliasing to occur, if it is indeed occurring. Considering that the repetition operator has worked this way for years now: sub { print \$_[0], "\n"; print \$_[1], "\n"; # same address }->(($x) x 2) __END__ SCALAR(0x7fc02982ef50) SCALAR(0x7fc02982ef50) I think we should consider this not-a-bug. Some code could be relying on it. (I know this ticket is marked resolved, but it is not fixed, and we still have a to-do test for it.) -- Father Chrysostomos --- via perlbug: queue: perl5 status: resolved https://rt.perl.org:443/rt3/Ticket/Display.html?id=7505Thread Previous | Thread Next