Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] perlop: "Assignment Operators" section missing scalar return value #17621

Open
subrook opened this issue Mar 7, 2020 · 0 comments
Open

Comments

@subrook
Copy link

subrook commented Mar 7, 2020

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:

perl -e '$a = $b = $c = 5; print "$a $b $c\n";'

This should be mentioned in this section of perlop. Thanks for considering this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant