> Greater than<= Less than or equal to>= Greater than or equal to<=> Returns –1 if less than, 0 if equal to, and 1 if greater than!= Not equal to.. Range of >= first operand to <= second operandTable 46.2 shows the string comparison operators and their meanings.
Table 46.2 String Comparison Operators in Perl
OperatorMeaningeq Is equal tolt Less thangt Greater thanle Less than or equal toge Greater than or equal tone Not equal tocmp Returns -1 if less than, 0 if equal to, and 1 if greater than=~ Matched by regular expression!~ Not matched by regular expressionCompound Operators
Perl uses compound operators, similar to those used by C or awk, which can
be used to combine other operations (such as comparisons or arithmetic) into
more complex forms of logic. Table 46.3 shows the compound pattern