Link to home
Start Free TrialLog in
Avatar of eversoslightly
eversoslightly

asked on

Case Insensitive

How do I make something case insensitive?
Say, if

$variable1 = "Hello";
$variable2 = "HELLO";

How can I tell if variable1 and variable 2 are the same, even though one is totally capitalized, and the other isn't?

Thanks,
Mark
Avatar of martinag
martinag

if (lc($variable1) eq lc($variable2)) {
  # I don't know is the "correct" way of doing it, but it works...
}

Martin
Avatar of eversoslightly

ASKER

Thanks!  Works great - just answer the question, and I'll give ya the points.
ASKER CERTIFIED SOLUTION
Avatar of martinag
martinag

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial