in reply to what is the scope of my $x=$x
In perl5, you have two different $x. In perl6, both $x are the same $x. To get at a variable named $x in an outer scope you need to use the fully qualified name of the variable which would include information about whether it's a global variable (GLOBAL::<$x>, perl6 has true globals BTW), a variable in the symbol table of the current package (OUR::<$x>), or a lexical variable in the surrounding lexical scope (OUTER::<$x>).
|
|---|