Constants
const
const pi = 3.14
say pi # prints: 3.14
#pi = 3 # compile-time error: can't modify non-lvalue constantfunc f(a) {
const x = a # created dynamically at each function call
return (x + 2)
}
say f(40) #=> 42
say f(50) #=> 52define
enum
Last updated