Perl 6 function argument syntax in the interpreter (REPL)

Viewed 153

There seems to be some inconsistencies in the argument syntax in the interpreter. I am using the latest Rakudo. Please see the following terminal output:

$ perl6
To exit type 'exit' or '^D'
> say: "foo"
foo
> say("foo")
foo
> say "foo"
===SORRY!=== Error while compiling:
Two terms in a row
------> say⏏ "foo"
    expecting any of:
        infix
        infix stopper
        statement end
        statement modifier
        statement modifier loop
> 
$ perl6
To exit type 'exit' or '^D'
> say "foo"
foo
> say("foo")
foo
> say: "foo"
foo
> say "foo"
===SORRY!=== Error while compiling:
Two terms in a row
------> say⏏ "foo"
    expecting any of:
        infix
        infix stopper
        statement end
        statement modifier
        statement modifier loop
> 
$ 

It seems that after you have used the ":" or "()" to supply the arguments, you cannot go back to use "", i.e., space, to supply arguments.

Or did I miss something?

Thanks !!!

lisprog

1 Answers
Related