Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: How do I compare two strings?by PipTigger (Hermit) |
on Jul 07, 2000 at 09:26 UTC ( [id://21412]=note: print w/replies, xml ) | Need Help?? |
As an addendum to turnstep's fine post:
Another useful test is: ne ... as in:
Just as: == tests equality between two numbers, != tests inequality for numbers and eq tests strings for equality as ne tests strings for inequality. I often find it useful to test to verify that a string has a value even if it's == 0.
In Section
Seekers of Perl Wisdom
|
|