Advertisement
cwchen

[Perl 6] comparison operators

Sep 30th, 2017
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.45 KB | None | 0 0
  1. 3 == 3 or die "Wrong condition";
  2. 3 != 2 or die "Wrong condition";
  3. 3 > 2 or die "Wrong condition";
  4. 3 >= 2 or die "Wrong condition";
  5. 3 < 5 or die "Wrong condition";
  6. 3 <= 5 or die "Wrong condition";
  7.  
  8. "Perl" eq "Perl" or die "Wrong condition";
  9. "Perl" ne "Ruby" or die "Wrong condition";
  10. "Perl" gt "C++" or die "Wrong condition";
  11. "Perl" ge "C++" or die "Wrong condition";
  12. "Perl" lt "Ruby" or die "Wrong condition";
  13. "Perl" le "Ruby" or die "Wrong condition";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement