use strict; use warnings; use Data::Dumper; my $x; { my $x->{a}->[0] = "no you don't!"; # my op also affects unrelated keys. Why? $x->{c}->[0] = "try this with previous 'my' for extra fun"; } { $x->{b}->[0] = "now you see"; } print Dumper $x; __END__ $VAR1 = { 'b' => [ 'now you see' ] };