Variable declaration reset: Difference between revisions

Content deleted Content added
Petelomax (talk | contribs)
mNo edit summary
Petelomax (talk | contribs)
m →‎{{header|Raku}}: the the -> to the
Line 128:
 
=={{header|Raku}}==
By default, Raku variables need a prefix sigil indicating the storage / interface, and a scope declarator to indicate the variables' accessibility. The vast majority of the time, variables are declared with a "my" scope declarator that constrains them theto the present block and any enclosed sub blocks. When a 'my' variable is declared inside a loop (block), a new independent instance of the variable is instantiated every time through.
 
<lang perl6>my @s = 1, 2, 2, 3, 4, 4, 5;