postfix .&

Documentation for postfix .& assembled from the following types:

language documentation Operators

From Operators

(Operators) postfix .&

The operator to call a subroutine (with at least one positional argument), such as a method. The invocant will be bound to the first positional argument.

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

my sub f($invocant){ "The arg has a value of $invocant" }
# OUTPUT: «The arg has a value of 42␤» 
42.&(-> $invocant { "The arg has a value of $invocant" });
# OUTPUT: «The arg has a value of 42␤»