Disable variable declaration in Perl 6

Is there a way to make Perl 6 not require myvariable declarations? I tried this:

#!/usr/bin/perl6
no strict;
no warnings;

$z = "hello world";
say $z;

But it didn’t work

===SORRY!=== Error while compiling ./helloworld.pl
Variable '$z' is not declared
at ./helloworld.pl:5
------> $z⏏ = "hello world";
    expecting any of:
        postfix

EDIT: This is a mistake in Rakudo. See Perl 6 spec: http://design.perl6.org/S01.html The official Rakudo package seems to be very outdated. It is recommended that you compile the source code: http://rakudo.org/how-to-get-rakudo/

+4
source share
1 answer

no strict; was implemented in October 2014.

See: https://github.com/rakudo/rakudo/blob/nom/docs/ChangeLog#L547

no warnings;, , . , . - .

+3

Source: https://habr.com/ru/post/1599439/


All Articles