Hi all, I love my variable and am looking for various ways of using it. I will show you a bit of code. $ perl -e 'my $x;$x->{foo}' # OK $ perl -e '(my $x)->{foo}' # NG I expected that autovivification would be applied to the variable in the later case as well as in the first case, but the results were different. Therefore I wrote the following patch. I would like your responses to that. --- pp_hot.c.orig 2004-05-21 10:49:37.000000000 +0900 +++ pp_hot.c 2004-05-21 10:50:32.000000000 +0900 @@ -202,13 +202,13 @@ dSP; dTARGET; XPUSHs(TARG); if (PL_op->op_flags & OPf_MOD) { - if (PL_op->op_private & OPpLVAL_INTRO) - SAVECLEARSV(PAD_SVl(PL_op->op_targ)); - else if (PL_op->op_private & OPpDEREF) { + if (PL_op->op_private & OPpDEREF) { PUTBACK; vivify_ref(PAD_SVl(PL_op->op_targ), PL_op->op_private & OPpDEREF); SPAGAIN; } + else if (PL_op->op_private & OPpLVAL_INTRO) + SAVECLEARSV(PAD_SVl(PL_op->op_targ)); } RETURN; } regards -- Shinya Hayakawa hayakawa@livedoor.jpThread Next