However you can't use sigilless attributesmy $x = 1; say $x; my \y = 1; say y; my @x = 1, 2; say @x; my \y = @ = 1, 2; say y; # also works with signatures sub foo(\x) { say x }; foo(1);
class ThisExplodes { has \.y; #doesnt work has \y; #neiter does this }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [Perl6] Small 6 discoveries V, Sigils
by Laurent_R (Canon) on Oct 09, 2017 at 06:27 UTC | |
by Anonymous Monk on Oct 23, 2017 at 21:32 UTC |