On Sat Jul 27 05:06:39 2002, nospam-abuse@ilyaz.org wrote: > [A complimentary Cc of this posting was sent to > Martien Verbruggen > <mgjv@tradingpost.com.au>], who wrote in article > <slrnak1205.n5.mgjv@verbruggen.comdyn.com.au>: > > But why would you consider using anything but the ($a, $b) = ($b, $a) > > expression? It's clearly the clearest, and will work for anything. > > IIRC, this construction (well, a similar one) has subtle problems with > aliasing present. Found this the hard way with File::Find... > > perl5.6.0 -wle 'BEGIN{ *a=\$a::a; *b = \$b::b } \ > ($a, $b) = (2,3); print "$a $b"; \ > ($a::a, $b::b) = ($b, $a); print "$a $b"' > 2 3 > 3 3 > > I think this may be considered as a bug, the parser has enough info to > detect this... > > Hope this helps, Twelve years after the report, this is finally fixed, in commit ff2a62e0c. -- Father Chrysostomos --- via perlbug: queue: perl5 status: stalled https://rt.perl.org/Ticket/Display.html?id=15667Thread Previous