MySQL's docs do say say "
By default, string comparisons are not case sensitive". I think it's unexpected but that's how it works.
trammell noted that you have to use the BINARY keyword to enable case sensitivity in MySQL.
I want to say that if you are going to explicitly lowercase (or uppercase) your strings for comparison then you should use the same function on each string. I mean use the MySQL LOWER() function on both strings.
If you were to mix Perl's
lc function with the database's LOWER function then you could have problems with say umlauts or something. It might work but it's just cleaner to use the same function on both strings.