multi infix:<plus>(Int $a, Int $b) {
return $a + $b;
}
multi infix:<plus>(Str $a, Str $b) {
return $a ~ $b;
}
say 10 plus 4;
# 14
say "foo" plus "bar";
# foobar
NQP in that link is "Not Quite Perl", a subset of the language which is the what actually needs to be implemented to support Perl 6. This is what's almost done being ported to Java. Again, for Rakudo, which is one implementation.