We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e978918 commit 5f5a4a6Copy full SHA for 5f5a4a6
doc/Language/traps.pod6
@@ -776,8 +776,13 @@ The trouble arises when a person wants to use more complex names for the variabl
776
777
Due to the variables allowed to be called anything, this can cause some problems if you are not accustomed to how Perl 6 handles these variables.
778
779
-=for code
+=begin code
780
+ # BAD NAMING: alphabetically `four` comes first and gets value `1` in it:
781
for 1..4 { say "$^one $^two $^three $^four"; } # OUTPUT: «2 4 3 1»
782
+
783
+ # GOOD NAMING: variables' naming makes it clear how they sort alphabetically:
784
+ for 1..4 { say "$^a $^b $^c $^d"; } # OUTPUT: «1 2 3 4»
785
+=end code
786
787
=head1 Scope
788
0 commit comments