On Thu, Apr 11, 2002 at 09:04:22AM -0400, Karger, Amir wrote: > I get the same result as you (aBcD) when I run 5.6.1 on solaris. So it looks > like the aliasing mechanism switched from 5.004 to 5.6.1.
I get the same behavior: $ perl -v This is perl, v5.6.1 built for i386-linux $ perl -le'%a = qw/ a b c d/; s/./uc$&/e for %a; print %a' aBcD And this one really takes the cake. Keys are modified, but not values... But wait! There is more! $ perl -le'%a = qw/ a b c d/; s/./uc$&/e for values %a; print %a' aBcD $ perl -le'%a = qw/ a b c d/; s/./uc$&/e for keys %a; print %a' abcd So if you specify the values, you can modify them. But if you specify the keys, you can't. Anyone's longing for a straight-jacket, yet? Joy, `/anick -- ($_,$\,@_ )=( 'Yeta onhterPrce h leark', "\n",split'', 'movfgmqjnelophrthuffrtoeqerpgvnhplgusujgkmlqesatokwlvpkwdasn' ); $i=-97+ord$a,s/(?<=.{$i})(.)(.)/$2$1/,print while$a=shift@_;