File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1282,16 +1282,17 @@ surrounding whitespace (before and/or after) to distinguish them.
1282
1282
Calls the right-side method on the value in the left-side container,
1283
1283
replacing the resulting value in the left-side container.
1284
1284
1285
- In most cases, this behaves identically to the postfix mutator, but the
1286
- precedence is lower:
1285
+ In most cases, this behaves identically to postfix L<C<.=>|#methodop_.=>,
1286
+ but the precedence is lower:
1287
1287
1288
1288
=for code
1289
1289
my $a = -5;
1290
- say ++$a.=abs;
1290
+ say ++$a.=abs; # with postfix mutator; equivalent to ++($a.=abs)
1291
1291
# OUTPUT: «6»
1292
1292
=for code :skip-test<illustrates error>
1293
- say ++$a .= abs;
1294
- # OUTPUT: «Cannot modify an immutable Int
1293
+ my $a = -5;
1294
+ say ++$a .= abs; # with infix mutator; evaluated as -4 .= abs
1295
+ # OUTPUT: «Cannot modify an immutable Int (-4)
1295
1296
# in block <unit> at <tmp> line 1»
1296
1297
1297
1298
=head2 infix C«.»
You can’t perform that action at this time.
0 commit comments