Skip to content

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

@subrook

Description

@subrook

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions