You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section documents the return value of a list assignment in list context, and of a list assignment in scalar context, but does not say anything about the return value of a scalar assignment.
I presume this return value is the value of the scalar assigned, as this would seem to be the mechanism that allows something like $a = $b = $c = 5 to assign 5 to all three variables:
perl -e '$a = $b = $c = 5; print "$a $b $c\n";'
This should be mentioned in this section of perlop. Thanks for considering this.
The text was updated successfully, but these errors were encountered:
Where
the Assignment Operators section of the perlop documentation (either from running
perldoc perlop
or visiting http://perldoc.perl.org/5.30.0/perlop.html#Assignment-Operators)Description
This section documents the return value of a list assignment in list context, and of a list assignment in scalar context, but does not say anything about the return value of a scalar assignment.
I presume this return value is the value of the scalar assigned, as this would seem to be the mechanism that allows something like
$a = $b = $c = 5
to assign 5 to all three variables:This should be mentioned in this section of perlop. Thanks for considering this.
The text was updated successfully, but these errors were encountered: