"ian.goodacre@xtra.co.nz (via RT)" <perlbug-followup@perl.org> writes:
> +If the left operand of the assignment operator is a list then the operator
Please don't call the left operand a "list". That is not just
misleading, but also risks propagating rather tough misconceptions.
Consider: "is an array, a hash, a slice, or enclosed in parentheses".
Consider: In the following, is f a list? a scalar? both?
use 5.010;
use strict;
use warnings;
my $x=1;
my $y=2;
sub f () :lvalue {
$x, $y
}
say f;
f=4;
say f;
f=(5,6);
say f
__END__
Useless use of a constant in void context at - line 12.
12
14
16
Eirik
--
Flon's Law:
There is not now, and never will be, a language in which it is
the least bit difficult to write bad programs.
Thread Previous
|
Thread Next