Advertisement
cwchen

[Perl 6] smart comparison operators

Sep 30th, 2017
619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.15 KB | None | 0 0
  1. (3 cmp 5) ~~ Less or die "Wrong condition";
  2. ("Perl" cmp "Perl") ~~ Same or die "Wrong condition";
  3. ("Ruby" cmp "Perl") ~~ More or die "Wrong condition";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement