1 # This is a *evil* example of random operator overloading.
7 # At compilation time, we randomly pick a op to be overloaded.
11 sub infix
:{$op} { 42 }
13 # Now one of +-*/ will return 42, the other ops will continue to work as
15 say "1 + 1 = {1 + 1}";
16 say "1 * 1 = {1 * 1}";
17 say "1 / 1 = {1 / 1}";
18 say "1 - 1 = {1 - 1}";