Built-in constants: pi, tau, e, i perl6 -e 'say pi ~ " " ~ tau ~ " " ~ e ~ " " ~ i';
3.141592653589793 6.283185307179586 2.718281828459045 0+1i
(tau is 2pi, useful if you want to calculate the circumference of your tuits.
Pi and tau can also be accessed as the Unicode characters.
User-defined
constant answer = 42;
Scope is lexical:
constant where = "outer";
say where; {
constant where = "inner";
say where;
}
say where;
