How do I define a variable that can be used in the next statement?
so far
my $a = 0
and
$a = 0
cannot be used after the line they are declared on without getting:
Variable '$a' is not declared.
How do I define a variable that can be used in the next statement?
so far
my $a = 0
and
$a = 0
cannot be used after the line they are declared on without getting:
Variable '$a' is not declared.
This works in a recent perl6 - what does "perl6 --version" say for you?
$ perl6 --version
This is Rakudo version 2016.07.1 built on MoarVM version 2016.07
implementing Perl 6.c.
$ perl6
You may want to `panda install Readline` or `panda install Linenoise` or use rlwrap for a line editor
To exit type 'exit' or '^D'
> my $a = 4;
4
> $a;
4
>