my $root = { some_object => obj }; $root->{some_object} = new Object; my $arrayref = $root->{some_object}->objectMethodReturningEmbeddedArrayref(); $arrayref->[0] = 5; { local $arrayref->[0] = 0; # execute some code, which sees 0 not 5 } # now array element is 5 again