2

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.

1

1 Answer 1

2

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
>
Sign up to request clarification or add additional context in comments.

2 Comments

I just rebuilt (2016.07.1-204-g0f420ad) and can confirm the problem; also, cf irclog.perlgeek.de/perl6/2016-08-17#i_13035898
This is definitely fixed now, sorry for the bug (which I might have caused :) ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.