in reply to Re: Autovivification of scalars in sub calls
in thread Autovivification of scalars in sub calls
Interesting. I knew that some builtins, like pos and keys, can be lvalues, but not that arguments to subs were. Come to think of it, I can't even say that I know what the expression "arguments to subs are lvalues" means. How is the argument in sleep( 3 ) an lvalue?
Be that as it may, where can I learn more about this sub-args-as-lvalues thing? I can't find documentation for it.
I agree that it is nice that being in an "lvalue context" induces autovivification, but I don't see the utility of regarding the arguments to a subroutine as lvalues. Granted, in some cases, like substr, the first argument can be thought of as being in an "lvalue context". Sort of. After a few drinks. But this seems too special a situation to warrant turning the arguments to a function into an "lvalue context".
the lowliest monk
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Autovivification of scalars in sub calls
by Roy Johnson (Monsignor) on Dec 08, 2005 at 18:47 UTC | |
Re^3: Autovivification of scalars in sub calls
by Anonymous Monk on Dec 08, 2005 at 22:01 UTC | |
by truedfx (Monk) on Dec 09, 2005 at 11:51 UTC | |
Re^3: Autovivification of scalars in sub calls
by Perl Mouse (Chaplain) on Dec 08, 2005 at 23:02 UTC |