Skip to content

Commit

Permalink
Allow ^... form just for lue++
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Oct 30, 2013
1 parent 3150289 commit 766f608
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions S03-operators.pod
Expand Up @@ -14,8 +14,8 @@ Synopsis 3: Perl 6 Operators

Created: 8 Mar 2004

Last Modified: 29 Oct 2013
Version: 269
Last Modified: 30 Oct 2013
Version: 270

=head1 Overview

Expand Down Expand Up @@ -2021,6 +2021,17 @@ Hence the sequence operator is "auto-reversing", unlike a range operator.
'z' .. 'a' # represents a null range
'z' ... 'a' # z y x ... a

For completeness, you may omit the first value using the C<^...> form:

'z' ^... 'a' # y x ... a
5 ^... 1 # 4, 3, 2, 1

But be aware that this form will almost certainly confuse your readers if the list
on the left is complicated, especially if the left list is another sequence:

1, 2, 3 ^... *; # 2, 3 ... !
1, 2, 3 ... 10, 20, 30 ^... *; # 2, 3 ... !?!?

As with numeric values, a string match must be exact, or an infinite sequence
is produced. Use a different smartmatch such as a regular expression or
a closure to do fancier tests.
Expand Down

0 comments on commit 766f608

Please sign in to comment.