That's a somewhat confusing defintion of lvalue. A lvalue, quite literally, is something that can appear on the left hand side of an = operator -- that is, something that can be assigned to. In perl, that includes assignable variables (read: almost all variables), and calls to lvalue subroutines (including lvaluable builtins like substr, and user-defined subroutines with the :lvalue attribute). (The first half of that includes, of course, any expression that results in an assignable variable, such as $foo->{bar}{baz}{quux}[-1].) The 42 in 42=1; is a non-lvalue in a slot that needs an lvalue. Note that there are places that need an lvalue other then the right-hand-side of a = operator, such as all the *= operators, ++ and --, and some sub arguments, sometimes only in some situations. In general, if an operation is going to modify something, that something must be an lvalue -- which is another defintion of lvalue: "something that can be modified".
Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).
| [reply] [d/l] [select] |