And this still has absolutely nothing to do with Perl but I just have to say it again:
in reply to OT: Sql statemet (how to ignore lower-upper case)
Watch out using functions like lower, upper or what not in WHERE clauses like:
Using a function in a where clause on a database column prevents the database from using any indexes. It has to apply the function to all rows first before it can decide about the selection and that's disastrous for performance if it is a big table.
where lower(name) = 'fubar'