in reply to forcing list-context
There are two assignment operator.
The choice of which assignment operator is used is based on what syntax of its LHS operand. If it "looks like a list", the list assignment operator will be used.
(my $first_entry) = grep ...; my ($first_entry) = grep ...; my @entries = grep ...;
Related: Mini-Tutorial: Scalar vs List Assignment Operator.
|
|---|