programming-examples/perl/Statement/Perl has a number of string comparison operators you can use in if statements.pl

8 lines
227 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
Perl Usage
eq Equal
ge Greater than or equal to
gt Greater than
le Less than or equal to
lt Less than
ne Not equal
cmp Returns -1 if less than, 0 if equal and 1 if greater than