While trying to convert some Perl 5 code to 6, I encountered problems
which golf down to:
Perl 5 code >perl -e 'my $x = int (3 / 2); print $x, "\n";'
works >1
First try >./perl6 -e 'my $x = int ( 3 / 2); say $x;;'
>===SORRY!===
>Confused
>at -e:1
That makes 2 of us
Next go >./perl6 -e ' my $x = int(3 / 2); say $x '
>invoke() not implemented in class 'int'
>in block <anon> at -e:1
Some references to Int (note upper case I) in online examples led me to try
Upper-case I
>./perl6 -e 'my $x = Int ( 3 / 2); say $x;'
>===SORRY!===
>Confused
>at -e:1
but finally >./perl6 -e 'my $x = Int( 3 / 2); say $x;'
works >1
Online searching didn't produce any unambiguous definition of int vs
Int, or parenthesis spacing before functions. That could be a
deficiency in my search terms or comprehension, but the error messages
aren't terribly helpful either.