use v6; multi sub foo-bar(Str $a, Str $b) { "str/str" } multi sub foo-bar(Str $a, Int $b) { "str/int" } multi sub foo-bar(Str $a, Num $b) { "str/num" } multi sub foo-bar(Str $a, Array $b) { "str/num" } { use v5; # oh shit, what now? do I: foo-bar("1", "2"); # syntax error call_perl6_func("foo-bar", "1", "2"); # calls, but breaks since Perl5 has no types # Maybe this instead: call_perl6_func("foo-bar", Perl6cast("Str", "1"), Perl6cast("Str", "2"); { use v6; # now how do I call perl 5? } }