in reply to getting fully qualified column names (mysql)

This has nothing to do with perl, but it's time for you to learn about column aliases in SQL.
SELECT foo AS bar...