note
tlm
<p>Interesting. I knew that some builtins, like [doc://pos] and [doc://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" <i>means</i>. How is the argument in <tt>sleep( 3 )</tt> an lvalue?</p>
<p>Be that as it may, where can I learn more about this sub-args-as-lvalues thing? I can't find documentation for it.</p>
<p>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 <tt>substr</tt>, 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".</p>
<div class="pmsig"><div class="pmsig-439528">
<p><small>the lowliest monk</small></p>
</div></div>
515098
515251