If you wanted to get closer to your objective, you should shoot for "Proper case for names in the English language". IMHO, this is not a problem to be solved by perl or programming altogether. Wouldn't this be better tackled by handling the your data-entry methods?