Perl True-False Comparison Operators

Part of the Perl For Dummies Cheat Sheet

When you're programming with Perl — or any other language — you use comparison operators all the time. The following table shows the common comparisons for Perl in both math and string form:

Comparison Math String
Equal to == eq
Not equal to != ne
Less than < lt
Greater than > gt
Less than or equal to <= le
Greater than or equal to >= ge
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
Perl For Dummies Cheat Sheet

Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.