in reply to list context
Do the parentheses around $x do anything?
Yes, they make a single-element list.
It seems to me that the rhs will always be a scalar...
It will, because the high-precedence or operator (||) imposes scalar context on its operands and evaluates to a scalar.
Consider, however, the difference between:
my $x = @some_array; my ($y) = @some_array;
The lvalue parentheses are significant.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: list context
by ikegami (Patriarch) on Dec 07, 2010 at 00:06 UTC | |
by chromatic (Archbishop) on Dec 07, 2010 at 00:13 UTC |