Skip to content

Commit d82b06c

Browse files
committed
doc Assignment Operators
1 parent 12df7b2 commit d82b06c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/Language/operators.pod

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,20 @@ Although not strictly operators, methods can be used in the same fashion.
137137
$a .= Int; # 3
138138
139139
=head2 Negated Relational Operators
140-
TODO
140+
141+
The result of a relational operator returning C<Bool> can be negated by
142+
prefixing with C<!>. To avoid visial confusion with the C<!!> operator,
143+
you may not modify any operator already beginning with C<!>.
144+
145+
There are shortcuts for C<!==> and C<!eq>, namely C<!=> and C<ne>.
146+
147+
my $a = True;
148+
say so $a != True; # False
149+
my $i = 10;
150+
151+
my $release = Date.new(:2015year, :12month, :24day);
152+
my $today = Date.today;
153+
say so $release !before $today; # True
141154
142155
=head2 Reversed Operators
143156
TODO

0 commit comments

Comments
 (0)