A method is a distinct function defined for a specific type of object. There may be methods that share the same name, but each pointing at different functions, depending on the type of the object on which they are invoked.
A method can be invoked using the prefix notation, even when a function with the same name is declared in the same scope. This is done by preceding the method with ::, as illustrated below:
func sqrt(n){"sqrt of #{n} is #{n.sqrt}"}say sqrt(42)# calls the `sqrt` function defined abovesay ::sqrt(42)# calls the `Number.sqrt()` method
Additionally, any alphanumeric method name can be used as an infix operator, by surrounding it with two backticks: