This proposal suggests making undeclared variables be lexical by default in Perl6 and deals with the possible ambiguities this could bring about. Lexically-scoped variables are easy to use and intuitive, in that any lexical variable refers to a variable declared within the current scope or the enclosing scope. The variable can be located by lexically scanning the source code. It is impossible to tell exactly what else might be happening to a dynamic variable, resulting in various action at a distance problems, variable suicide problems, and other difficulties. Under this proposal, lexical variables are considered to be the norm for Perl6.
Any undeclared variable is considered to be a lexical variable.
An undeclared variable is lexical and visible only within the scope where it is first used and any scopes contained within that one. In all cases, the C operator behaves as it does in Perl5, allowing local variables that will not interfere with other variables, etc. Dynamic Assignment Dynamic assignment is the technical term given to the action performed by C in Perl5 and earlier versions. The value of a variable is saved upon execution of the operator and restored when the current scope ends. There is no actual reason why dynamic assignment needs to be limited to dynamic variables.