in reply to Re^2: How to find out if an argument is an LVALUE ?
in thread How to find out if an argument is an LVALUE ? (TinyPerl)
When we pass a literal number, for example MODIFY(4), what do you call that?I call it "argument", just as any non-literal argument. The difference is subtly hinted at in perlsub:
In a subroutine that does not use signatures, any arguments passed in show up in the array @_. Therefore, if you called a function with two arguments, those would be stored in $_[0] and $_[1]. The array @_ is a local array, but its elements are aliases for the actual scalar parameters. In particular, if an element $_[0] is updated, the corresponding argument is updated (or an error occurs if it is not updatable).Maybe your original question stems from this, as "updatable" is more or less the same as "lvalue"?
|
---|