Skip to content

Commit

Permalink
Merge 3ef578f into 08e4a1e
Browse files Browse the repository at this point in the history
  • Loading branch information
jidanni committed May 28, 2021
2 parents 08e4a1e + 3ef578f commit 8fee286
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pod/perlop.pod
Expand Up @@ -626,6 +626,13 @@ support C<"NaN">.)
Binary C<"cmp"> returns -1, 0, or 1 depending on whether the left
argument is stringwise less than, equal to, or greater than the right
argument.

Here we can see the difference between <=> and cmp,

print 10 <=> 2 #prints 1
print 10 cmp 2 #prints -1

(likewise between gt and >, lt and <, etc.)
X<cmp>

Binary C<"~~"> does a smartmatch between its arguments. Smart matching
Expand Down

0 comments on commit 8fee286

Please sign in to comment.