P is for Practical | |
PerlMonks |
Re: How do I compare two strings?by turnstep (Parson) |
on Mar 29, 2000 at 21:44 UTC ( [id://6437]=note: print w/replies, xml ) | Need Help?? |
== 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:
In Section
Seekers of Perl Wisdom
|
|