http://www.perlmonks.org?node_id=1009163


in reply to Re^4: $1 not "freezing" in an addition
in thread $1 not "freezing" in an addition

lvalue context has nothing to do with scalar/void/list context.

lvalue and lvalue context are not the same thing.

An lvalue context is a context where an expression must produce an lvalue. In contrast, an rvalue context is a context where code may produce an rvalue.

Example of lvalue contexts:

When using $1,$2... in an expression ( anything you can legally say in a spot where a value is required ) you should quote to stringify and preserve the current value.

No, it's stupid to do $x = "$1";.

...though I admit the lvalue context is not sufficient (e.g. $bar = "$1" + foo();).