|
|
| We don't bite newbies here... much | |
| PerlMonks |
Answer: How do I compare two strings? |
| ( #6437=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > strings > How do I compare two strings? contributed by turnstep
== tests equality for numbers. eq does the same for strings. lt is the string testing equivalent of the numerical < gt is the string testing equivalent of the numerical > You can also use the cmp operator, which is the non-numerical equivalent of the <=> operator:
$result will be:
|
|
||||||||||||||||||