It's common to store passwords in a database like this. I have two things to add that I learned the-hard-way.
User applications should not use the PASSWORD() function. MySQL AB has
documented that this function may change between versions. Their documentation says you should use MD5() or SHA1(). (The 4.0 to 4.1 upgrade was a pain at the shop I was working at.)
Another way is to hash the value in perl before passing it to the database. You could use
Digest::SHA256 or
Digest::MD5 for example.
For some reason (that I don't know) string comparisons are
not case sensitve in MySQL unless you use the BINARY keyword in the query or the columns were created with the BINARY attribute.