You could use some kind of
tie magic to map key names. I didn't work it out, but you can use the code of
Tie::Hash::Cannabinol (lol) as a starting point.
But honestly, i think you're better off if you rewrite your code, either by search and replacing field names or by changing to index driven processing.
update:
If you have control over the database, simple create a view/stored query or whatever you call it that maps your names and save it as
_tablename. In your code you only have to change
tablename to
_tablename.
update:
Mentioning Tie::Hash::Cannabinol was not a joke (as the voting indicates). The module is really a good example for tie-ing hashes.