routine .=

Documentation for routine .= assembled from the following types:

language documentation Operators

From Operators

(Operators) postfix .=

A mutating method call. $invocant.=method desugars to $invocant = $invocant.method, similar to =.

Technically, not a real operator; it's syntax special-cased in the compiler.

language documentation Operators

From Operators

(Operators) infix .=

Calls the right-side method on the value in the left-side container, replacing the resulting value in the left-side container.

In most cases, this behaves identically to the postfix mutator, but the precedence is lower:

my $a = -5;
say ++$a.=abs;
# OUTPUT: «6␤» 
say ++$a .= abs;
# OUTPUT: «Cannot modify an immutable Int␤ 
#           in block <unit> at <tmp> line 1␤␤»